summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2018-11-01 15:38:30 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2018-11-03 16:09:36 +0100
commitbc1976011adb51951dc0280817b2c047ab22ac7c (patch)
treefd81c96c17cf0d6d13866286f788247b4c07d0be /scripts
parent79879bd201d4156312bb03fc0b7228ce34a3bf38 (diff)
downloadlvm2-bc1976011adb51951dc0280817b2c047ab22ac7c.tar.gz
cov: explicit ignore if failures
Here we can't do anything better than just ignore syscall failures (with silence as there is no loging mechanism)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/generator-internals.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/generator-internals.c b/scripts/generator-internals.c
index 00a15e547..5acc96971 100644
--- a/scripts/generator-internals.c
+++ b/scripts/generator-internals.c
@@ -42,18 +42,18 @@ static bool _open_child(struct child_process *child, const char *cmd, const char
child->pid = fork();
if (child->pid < 0) {
- close(pipe_fd[0]);
- close(pipe_fd[1]);
+ (void) close(pipe_fd[0]);
+ (void) close(pipe_fd[1]);
_error("call to fork() failed: %d\n", r);
return false;
}
if (child->pid == 0) {
// child
- close(pipe_fd[0]);
+ (void) close(pipe_fd[0]);
if (pipe_fd[1] != STDOUT_FILENO) {
- dup2(pipe_fd[1], STDOUT_FILENO);
- close(pipe_fd[1]);
+ (void) dup2(pipe_fd[1], STDOUT_FILENO);
+ (void) close(pipe_fd[1]);
}
if (execv(cmd, (char *const *) argv) < 0)
@@ -62,7 +62,7 @@ static bool _open_child(struct child_process *child, const char *cmd, const char
exit(1);
} else {
// parent
- close(pipe_fd[1]);
+ (void) close(pipe_fd[1]);
child->fp = fdopen(pipe_fd[0], "r");
if (!child->fp) {
_error("call to fdopen() failed\n");
@@ -78,7 +78,7 @@ static bool _close_child(struct child_process *child)
{
int status;
- fclose(child->fp);
+ (void) fclose(child->fp);
while (waitpid(child->pid, &status, 0) < 0)
if (errno != EINTR)