]> granicus.if.org Git - sudo/commitdiff
Quiet gcc warnings on glibc systems that use warn_unused_result for
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 11 Sep 2010 13:26:20 +0000 (09:26 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 11 Sep 2010 13:26:20 +0000 (09:26 -0400)
write(2).

--HG--
branch : 1.7

exec.c

diff --git a/exec.c b/exec.c
index 86bb7fb8f3707a357514e087f2b88dce35aa32b7..d575a936b6b7de4a64ff76f300c3180f42ce9d03 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -524,7 +524,8 @@ handler(s)
      * The pipe is non-blocking, if we overflow the kernel's pipe
      * buffer we drop the signal.  This is not a problem in practice.
      */
-    (void)write(signal_pipe[1], &signo, sizeof(signo));
+    if (write(signal_pipe[1], &signo, sizeof(signo)) == -1)
+       /* shut up glibc */;
 }
 
 /*