Просмотр исходного кода

libdpkg: Split unrelated conditionals in checksubprocerr for n and PROCPIPE

Guillem Jover лет назад: 17
Родитель
Сommit
ac3a40d18a
2 измененных файлов с 10 добавлено и 1 удалено
  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>
 
 	* 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
       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") : "");