]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix compile error.
authorTim Kientzle <kientzle@gmail.com>
Mon, 10 Nov 2008 18:57:16 +0000 (13:57 -0500)
committerTim Kientzle <kientzle@gmail.com>
Mon, 10 Nov 2008 18:57:16 +0000 (13:57 -0500)
Submitted by: Ivailo Petrov

SVN-Revision: 250

libarchive/archive_read.c

index f0ed147c185cf9281ea9d8589c817c8ad153f82e..24e2596b79fdea2f4f5fb8e0d7bd7199226bd139 100644 (file)
@@ -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)