summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/mlib.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 67918fb1d..b7414a741 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2008-12-05 Guillem Jover <guillem@debian.org>
+ * lib/mlib.c (checksubprocerr): Split unrelated conditionals for n
+ and PROCPIPE.
+
+2008-12-05 Guillem Jover <guillem@debian.org>
+
* lib/mlib.c (checksubprocerr): Return an explicit 0 instead of n.
2008-12-05 Guillem Jover <guillem@debian.org>
diff --git a/lib/mlib.c b/lib/mlib.c
index edf21f408..b315e7011 100644
--- a/lib/mlib.c
+++ b/lib/mlib.c
@@ -131,7 +131,11 @@ int checksubprocerr(int status, const char *description, int flags) {
else
ohshit(_("subprocess %s returned error exit status %d"), description, n);
} else if (WIFSIGNALED(status)) {
- n= WTERMSIG(status); if (!n || ((flags & PROCPIPE) && n==SIGPIPE)) return 0;
+ n = WTERMSIG(status);
+ if (!n)
+ return 0;
+ if ((flags & PROCPIPE) && n == SIGPIPE)
+ return 0;
if (flags & PROCWARN)
warning(_("%s killed by signal (%s)%s"),
description, strsignal(n), WCOREDUMP(status) ? _(", core dumped") : "");