Explorar el Código

libdpkg: Split unrelated conditionals in checksubprocerr for n and PROCPIPE

Guillem Jover hace 17 años
padre
commit
ac3a40d18a
Se han modificado 2 ficheros con 10 adiciones y 1 borrados
  1. 5 0
      ChangeLog
  2. 5 1
      lib/mlib.c

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+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>
 2008-12-05  Guillem Jover  <guillem@debian.org>
 
 
 	* lib/mlib.c (checksubprocerr): Return an explicit 0 instead of n.
 	* lib/mlib.c (checksubprocerr): Return an explicit 0 instead of n.

+ 5 - 1
lib/mlib.c

@@ -131,7 +131,11 @@ int checksubprocerr(int status, const char *description, int flags) {
     else
     else
       ohshit(_("subprocess %s returned error exit status %d"), description, n);
       ohshit(_("subprocess %s returned error exit status %d"), description, n);
   } else if (WIFSIGNALED(status)) {
   } 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)
     if (flags & PROCWARN)
       warning(_("%s killed by signal (%s)%s"),
       warning(_("%s killed by signal (%s)%s"),
               description, strsignal(n), WCOREDUMP(status) ? _(", core dumped") : "");
               description, strsignal(n), WCOREDUMP(status) ? _(", core dumped") : "");