diff options
author | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-12-08 20:20:03 (EST) |
---|---|---|
committer | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-12-08 20:20:03 (EST) |
commit | 2fdb3fc0b67757afd6fe7a244b6e14d2a546af0e (patch) | |
tree | a5e28a26a07e429a753f29945cc8ba9c4f6c9884 /libbb/unzip.c | |
parent | e4a49209222ea7385f64e9336425df115a3ea1a3 (diff) |
Merge commit 'grg' into HEAD
git-svn-id: http://opkg.googlecode.com/svn/trunk@471 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libbb/unzip.c')
-rw-r--r-- | libbb/unzip.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libbb/unzip.c b/libbb/unzip.c index 7ff07a5..e0a2388 100644 --- a/libbb/unzip.c +++ b/libbb/unzip.c @@ -57,9 +57,6 @@ static unsigned long *crc_table = NULL; static unsigned long crc; /* shift register contents */ -/* Return codes from gzip */ -static const int ERROR = 1; - /* * window size--must be a power of two, and * at least 32K for zip's deflate method @@ -100,7 +97,7 @@ static const unsigned short mask_bits[] = { static void abort_gzip() { error_msg("gzip aborted\n"); - _exit(ERROR); + _exit(-1); } static void make_crc_table() @@ -975,8 +972,7 @@ extern int unzip(FILE *l_in_file, FILE *l_out_file) } if (method < 0) { - printf("it failed\n"); - return(exit_code); /* error message already emitted */ + return(exit_code); } make_crc_table(); @@ -987,7 +983,7 @@ extern int unzip(FILE *l_in_file, FILE *l_out_file) int res = inflate(); if (res == 3) { - error_msg(memory_exhausted); + perror_msg("inflate"); exit_code = 1; } else if (res != 0) { error_msg("invalid compressed data--format violated"); |