]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Write to /dev/null rather than /dev/zero
authorUlf Hermann <ulf.hermann@qt.io>
Thu, 4 May 2017 15:27:47 +0000 (17:27 +0200)
committerMark Wielaard <mark@klomp.org>
Mon, 24 Jul 2017 09:40:18 +0000 (11:40 +0200)
/dev/zero is meant for reading zeroes. /dev/null is for writing into
nirvana.

Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
tests/ChangeLog
tests/elfshphehdr.c

index 3dd6f2a9f0e71c0d7fb1626149ede26f04f5401d..a4404e42420722a573a3a73621b2ff34cd3e1ce6 100644 (file)
@@ -1,3 +1,7 @@
+2017-05-04  Ulf Hermann  <ulf.hermann@qt.io>
+
+       * elfshphehdr.c: For writing, use /dev/null rather than /dev/zero.
+
 2017-07-14  Mark Wielaard  <mark@klomp.org>
 
        * run-strip-remove-keep.sh: New test.
index 5a297e0db88a96f8e594a314454b9d72918abebb..8183937cb9c3dee7e9376704817645ccaac8ee3a 100644 (file)
@@ -152,7 +152,7 @@ main (int argc __attribute__ ((unused)), char **argv __attribute ((unused)))
 {
   elf_version (EV_CURRENT);
 
-  int fd = fd = open("/dev/zero", O_WRONLY);
+  int fd = open("/dev/null", O_WRONLY);
   check ("open", fd >= 0);
 
   Elf *elf;