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

libdpkg: If PROCNOERR in subproc_check() return the status code

If the caller asked for no errors, it does not make sense to lose the
status code on return. So we return it instead of -1.
Guillem Jover лет назад: 16
Родитель
Сommit
03b7c00daf
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      lib/dpkg/subproc.c

+ 1 - 1
lib/dpkg/subproc.c

@@ -80,7 +80,7 @@ subproc_check(int status, const char *desc, int flags)
 		if (!n)
 			return 0;
 		if (flags & PROCNOERR)
-			return -1;
+			return n;
 		if (flags & PROCWARN)
 			warning(_("%s returned error exit status %d"),
 			        desc, n);