1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-05-27 20:56:39 +02:00

Placate valgrind, wrt ./cp --sparse=always

* src/copy.c (copy_reg): Place the sentinel by setting a
full word's worth of bits, not just a single byte's worth.
This avoids a harmless (but distracting) case of memory being
used-uninitialized.
This commit is contained in:
Jim Meyering
2007-02-22 12:50:36 +01:00
parent c25841e0d4
commit f48ca7f500
2 changed files with 10 additions and 1 deletions
+8
View File
@@ -1,3 +1,11 @@
2007-02-22 Jim Meyering <jim@meyering.net>
Placate valgrind, wrt ./cp --sparse=always
* src/copy.c (copy_reg): Place the sentinel by setting a
full word's worth of bits, not just a single byte's worth.
This avoids a harmless (but distracting) case of memory being
used-uninitialized.
2007-02-21 Jim Meyering <jim@meyering.net>
* tests/misc/date: Remove vestigial use of Data::Dumper.
+2 -1
View File
@@ -430,7 +430,8 @@ copy_reg (char const *src_name, char const *dst_name,
{
char *cp;
buf[n_read] = 1; /* Sentinel to stop loop. */
wp = (word *) (buf + n_read);
*wp = 1; /* Sentinel to stop loop. */
/* Find first nonzero *word*, or the word with the sentinel. */