From f394c1d0a5b2c9a5f705272d26df6b35ed8cdfa0 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Mon, 10 Nov 2008 13:57:16 -0500 Subject: [PATCH] Fix compile error. Submitted by: Ivailo Petrov SVN-Revision: 250 --- libarchive/archive_read.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.47.3