You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-arch/pigz/files/0001-Do-not-return-non-zero...

48 lines
1.4 KiB

From 0c967f989d2f1afe1829cf7cf2f6d36846a625ec Mon Sep 17 00:00:00 2001
From: Mark Adler <madler@alumni.caltech.edu>
Date: Sun, 19 Jan 2014 23:21:58 -0800
Subject: [PATCH] Do not return non-zero exit code when warnings issued.
---
pigz.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/pigz.c b/pigz.c
index 4fefe40..4a16799 100644
--- a/pigz.c
+++ b/pigz.c
@@ -478,7 +478,6 @@ local struct {
int procs; /* maximum number of compression threads (>= 1) */
int setdict; /* true to initialize dictionary in each thread */
size_t block; /* uncompressed input size per thread (>= 32K) */
- int warned; /* true if a warning has been given */
/* saved gzip/zip header data for decompression, testing, and listing */
time_t stamp; /* time stamp from gzip header */
@@ -519,7 +518,6 @@ local int complain(char *fmt, ...)
va_end(ap);
putc('\n', stderr);
fflush(stderr);
- g.warned = 1;
}
return 0;
}
@@ -3929,7 +3927,6 @@ int main(int argc, char **argv)
/* initialize globals */
g.outf = NULL;
g.first = 1;
- g.warned = 0;
g.hname = NULL;
/* save pointer to program name for error messages */
@@ -4020,5 +4017,5 @@ int main(int argc, char **argv)
/* done -- release resources, show log */
new_opts();
log_dump();
- return g.warned ? 2 : 0;
+ return 0;
}
--
1.8.5.3