Sfoglia il codice sorgente

libdpkg: In checksubprocerr return an explicit 0 instead of n

Guillem Jover 17 anni fa
parent
commit
bac56ef59f
2 ha cambiato i file con 7 aggiunte e 1 eliminazioni
  1. 4 0
      ChangeLog
  2. 3 1
      lib/mlib.c

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+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>
 
 	* lib/ehandle.c (warning): Print the current program name and a

+ 3 - 1
lib/mlib.c

@@ -121,7 +121,9 @@ void m_pipe(int *fds) {
 int checksubprocerr(int status, const char *description, int flags) {
   int n;
   if (WIFEXITED(status)) {
-    n= WEXITSTATUS(status); if (!n) return n;
+    n = WEXITSTATUS(status);
+    if (!n)
+      return 0;
     if (flags & PROCNOERR)
       return -1;
     if (flags & PROCWARN)