gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated: -check return values


From: gnunet
Subject: [gnunet] branch master updated: -check return values
Date: Mon, 09 Aug 2021 15:32:25 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 2c2cc95e7 -check return values
2c2cc95e7 is described below

commit 2c2cc95e7ad9c315374068aa0b3d3dca4ede928f
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Aug 9 15:28:56 2021 +0200

    -check return values
---
 src/util/os_priority.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/util/os_priority.c b/src/util/os_priority.c
index 1ed9bcbf7..dc2f0f97e 100644
--- a/src/util/os_priority.c
+++ b/src/util/os_priority.c
@@ -316,7 +316,7 @@ open_dev_null (int target_fd, int flags)
   if (-1 == dup2 (fd, target_fd))
   {
     GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "dup2");
-    (void) close (fd);
+    GNUNET_break (0 == close (fd));
     return;
   }
   GNUNET_break (0 == close (fd));
@@ -395,7 +395,7 @@ start_process (enum GNUNET_OS_InheritStdioFlags 
std_inheritance,
       if (NULL != childpipe_write)
         GNUNET_DISK_file_close (childpipe_write);
       if (0 <= dup_childpipe_read_fd)
-        close (dup_childpipe_read_fd);
+        GNUNET_break (0 == close (dup_childpipe_read_fd));
       return NULL;
     }
     childpipe_read_fd = dup_childpipe_read_fd;
@@ -474,7 +474,7 @@ start_process (enum GNUNET_OS_InheritStdioFlags 
std_inheritance,
     if (NULL != childpipe_write)
       GNUNET_DISK_file_close (childpipe_write);
     if (0 <= childpipe_read_fd)
-      close (childpipe_read_fd);
+      GNUNET_break (0 == close (childpipe_read_fd));
     errno = eno;
     return NULL;
   }
@@ -486,7 +486,7 @@ start_process (enum GNUNET_OS_InheritStdioFlags 
std_inheritance,
     gnunet_proc->control_pipe = childpipe_write;
     if (0 != (std_inheritance & GNUNET_OS_USE_PIPE_CONTROL))
     {
-      close (childpipe_read_fd);
+      GNUNET_break (0 == close (childpipe_read_fd));
     }
     GNUNET_array_grow (lscp, ls, 0);
     return gnunet_proc;
@@ -564,7 +564,7 @@ start_process (enum GNUNET_OS_InheritStdioFlags 
std_inheritance,
       {
         /* Bury any existing FD, no matter what; they should all be closed
          * on exec anyway and the important ones have been dup'ed away */
-        (void) close (tgt);
+        GNUNET_break (0 == close (tgt));
         GNUNET_assert (-1 != dup2 (lscp[i], tgt));
       }
       /* unset close-on-exec flag */

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]