diff options
author | kientzle <kientzle@FreeBSD.org> | 2009-03-07 02:29:43 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2009-03-07 02:29:43 +0000 |
commit | f2d3c8136fe522dc902d10c2182f55c291159a67 (patch) | |
tree | 25f6e381fab29179759de649c82b5f2725693ce4 /lib | |
parent | c62420e1f0ff5dd84bcb92e8c674805ca1e89fb7 (diff) | |
download | FreeBSD-src-f2d3c8136fe522dc902d10c2182f55c291159a67.zip FreeBSD-src-f2d3c8136fe522dc902d10c2182f55c291159a67.tar.gz |
Merge r591 from libarchive.googlecode.com: signed/unsigned fixes.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libarchive/archive_read_support_compression_bzip2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libarchive/archive_read_support_compression_bzip2.c b/lib/libarchive/archive_read_support_compression_bzip2.c index fa4168c..506dcfe 100644 --- a/lib/libarchive/archive_read_support_compression_bzip2.c +++ b/lib/libarchive/archive_read_support_compression_bzip2.c @@ -200,7 +200,7 @@ bzip2_filter_read(struct archive_read_filter *self, const void **p) { struct private_data *state; size_t read_avail, decompressed; - unsigned char *read_buf; + const char *read_buf; ssize_t ret; state = (struct private_data *)self->data; @@ -262,11 +262,11 @@ bzip2_filter_read(struct archive_read_filter *self, const void **p) /* stream.next_in is really const, but bzlib * doesn't declare it so. <sigh> */ - read_buf = (unsigned char *)(uintptr_t) + read_buf = __archive_read_filter_ahead(self->upstream, 1, &ret); if (read_buf == NULL) return (ARCHIVE_FATAL); - state->stream.next_in = read_buf; + state->stream.next_in = (char *)(uintptr_t)read_buf; state->stream.avail_in = ret; /* There is no more data, return whatever we have. */ if (ret == 0) { @@ -280,7 +280,7 @@ bzip2_filter_read(struct archive_read_filter *self, const void **p) /* Decompress as much as we can in one pass. */ ret = BZ2_bzDecompress(&(state->stream)); __archive_read_filter_consume(self->upstream, - (unsigned char *)state->stream.next_in - read_buf); + state->stream.next_in - read_buf); switch (ret) { case BZ_STREAM_END: /* Found end of stream. */ |