summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-08-09 15:28:56 +0200
committerChristian Grothoff <christian@grothoff.org>2021-08-09 15:28:56 +0200
commit2c2cc95e7ad9c315374068aa0b3d3dca4ede928f (patch)
tree93e8b4b9ba13f848a93591c32784d9d7eb91929b
parent6db56797ae56332504477ef4185ea3a53cc59c80 (diff)
-check return values
-rw-r--r--src/util/os_priority.c10
1 files 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 */