aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--utils.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/utils.c b/utils.c
index 472520f..46918f4 100644
--- a/utils.c
+++ b/utils.c
@@ -417,12 +417,14 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts,
int pipefd_stderr[2] = {-1, -1};
int pgid = -1;
- if ((rc = pipe2(pipefd_stdout, 0)) == -1)
+ if (pipe2(pipefd_stdout, 0) == -1) {
+ rc = -1;
break;
-
- if ((rc = pipe2(pipefd_stderr, 0)) == -1) {
+ }
+ if (pipe2(pipefd_stderr, 0) == -1) {
close(pipefd_stdout[PIPE_READ]);
close(pipefd_stdout[PIPE_WRITE]);
+ rc = -1;
break;
}