From owner-svn-src-head@FreeBSD.ORG Sat Mar 7 02:29:43 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88E381065670; Sat, 7 Mar 2009 02:29:43 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 76AB08FC12; Sat, 7 Mar 2009 02:29:43 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n272ThKT035748; Sat, 7 Mar 2009 02:29:43 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n272ThkM035747; Sat, 7 Mar 2009 02:29:43 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200903070229.n272ThkM035747@svn.freebsd.org> From: Tim Kientzle Date: Sat, 7 Mar 2009 02:29:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189475 - head/lib/libarchive X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2009 02:29:44 -0000 Author: kientzle Date: Sat Mar 7 02:29:43 2009 New Revision: 189475 URL: http://svn.freebsd.org/changeset/base/189475 Log: Merge r591 from libarchive.googlecode.com: signed/unsigned fixes. Modified: head/lib/libarchive/archive_read_support_compression_bzip2.c Modified: head/lib/libarchive/archive_read_support_compression_bzip2.c ============================================================================== --- head/lib/libarchive/archive_read_support_compression_bzip2.c Sat Mar 7 02:24:32 2009 (r189474) +++ head/lib/libarchive/archive_read_support_compression_bzip2.c Sat Mar 7 02:29:43 2009 (r189475) @@ -200,7 +200,7 @@ bzip2_filter_read(struct archive_read_fi { 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_fi /* stream.next_in is really const, but bzlib * doesn't declare it so. */ - 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_fi /* 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. */