public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Write to /dev/null rather than /dev/zero
@ 2017-05-04 16:05 Ulf Hermann
  2017-07-24  9:51 ` Mark Wielaard
  0 siblings, 1 reply; 2+ messages in thread
From: Ulf Hermann @ 2017-05-04 16:05 UTC (permalink / raw)
  To: elfutils-devel

/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     | 4 ++++
 tests/elfshphehdr.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/ChangeLog b/tests/ChangeLog
index b8de138..fef6f55 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,9 @@
 2017-05-04  Ulf Hermann  <ulf.hermann@qt.io>
 
+	* elfshphehdr.c: For writing, use /dev/null rather than /dev/zero.
+
+2017-05-04  Ulf Hermann  <ulf.hermann@qt.io>
+
 	* newfile.c: Close the file when we're done and unlink it afterwards.
 	* newscn.c: Likewise.
 	* update1.c: Likewise.
diff --git a/tests/elfshphehdr.c b/tests/elfshphehdr.c
index d1ab633..e0f0712 100644
--- a/tests/elfshphehdr.c
+++ b/tests/elfshphehdr.c
@@ -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 | O_BINARY);
+  int fd = fd = open("/dev/null", O_WRONLY | O_BINARY);
   check ("open", fd >= 0);
 
   Elf *elf;
-- 
2.1.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Write to /dev/null rather than /dev/zero
  2017-05-04 16:05 [PATCH] Write to /dev/null rather than /dev/zero Ulf Hermann
@ 2017-07-24  9:51 ` Mark Wielaard
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2017-07-24  9:51 UTC (permalink / raw)
  To: Ulf Hermann; +Cc: elfutils-devel

On Thu, May 04, 2017 at 05:27:47PM +0200, Ulf Hermann wrote:
> /dev/zero is meant for reading zeroes. /dev/null is for writing into
> nirvana.

Thanks, applied to master.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-24  9:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-04 16:05 [PATCH] Write to /dev/null rather than /dev/zero Ulf Hermann
2017-07-24  9:51 ` Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).