diff options
author | Rob Landley <rob@landley.net> | 2013-04-26 01:47:59 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2013-04-26 01:47:59 -0500 |
commit | 4f499558a11f46d91b1a9f81a02c49226249d9ab (patch) | |
tree | 460d285c823a3056a3534a2404d121227f0f123e /lib/bunzip.c | |
parent | 7d4d0a010926ed98f10c410eb1d6549d4131ec18 (diff) | |
download | toybox-4f499558a11f46d91b1a9f81a02c49226249d9ab.tar.gz |
Eliminate leaked global bunzip_errors.
Diffstat (limited to 'lib/bunzip.c')
-rw-r--r-- | lib/bunzip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/bunzip.c b/lib/bunzip.c index 2836d38c..fd40c147 100644 --- a/lib/bunzip.c +++ b/lib/bunzip.c @@ -95,7 +95,7 @@ static unsigned int get_bits(struct bunzip_data *bd, char bits_wanted) // If we need to read more data from file into byte buffer, do so if (bd->inbufPos == bd->inbufCount) { if (0 >= (bd->inbufCount = read(bd->in_fd, bd->inbuf, IOBUF_SIZE))) - error_exit("Unexpected input EOF"); + error_exit("input EOF"); bd->inbufPos = 0; } @@ -419,7 +419,7 @@ void flush_bunzip_outbuf(struct bunzip_data *bd, int out_fd) { if (bd->outbufPos) { if (write(out_fd, bd->outbuf, bd->outbufPos) != bd->outbufPos) - error_exit("Unexpected output EOF"); + error_exit("output EOF"); bd->outbufPos = 0; } } @@ -619,6 +619,7 @@ int start_bunzip(struct bunzip_data **bdp, int src_fd, char *inbuf, int len) void bunzipStream(int src_fd, int dst_fd) { struct bunzip_data *bd; + char *bunzip_errors[]={NULL, "not bzip", "bad data", "old format"}; int i, j; if (!(i = start_bunzip(&bd,src_fd,0,0))) { |