From: Tim Kientzle Date: Mon, 10 Nov 2008 18:57:16 +0000 (-0500) Subject: Fix compile error. X-Git-Tag: v2.6.0~43 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f394c1d0a5b2c9a5f705272d26df6b35ed8cdfa0;p=thirdparty%2Flibarchive.git Fix compile error. Submitted by: Ivailo Petrov SVN-Revision: 250 --- diff --git a/libarchive/archive_read.c b/libarchive/archive_read.c index f0ed147c1..24e2596b7 100644 --- a/libarchive/archive_read.c +++ b/libarchive/archive_read.c @@ -790,6 +790,7 @@ const void * __archive_read_ahead(struct archive_read *a, size_t min, ssize_t *avail) { ssize_t bytes_read; + size_t tocopy; if (a->fatal) { *avail = ARCHIVE_FATAL; @@ -919,7 +920,7 @@ __archive_read_ahead(struct archive_read *a, size_t min, ssize_t *avail) /* We can add client data to copy buffer. */ /* First estimate: copy to fill rest of buffer. */ - size_t tocopy = (a->buffer + a->buffer_size) + tocopy = (a->buffer + a->buffer_size) - (a->next + a->avail); /* Don't waste time buffering more than we need to. */ if (tocopy + a->avail > min)