diff options
-rw-r--r-- | lib/libarchive/archive_read_support_format_empty.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/libarchive/archive_read_support_format_empty.c b/lib/libarchive/archive_read_support_format_empty.c index db24d9d..38498cf 100644 --- a/lib/libarchive/archive_read_support_format_empty.c +++ b/lib/libarchive/archive_read_support_format_empty.c @@ -59,14 +59,13 @@ archive_read_support_format_empty(struct archive *_a) static int archive_read_format_empty_bid(struct archive_read *a) { + const void *h; ssize_t avail; - (void)__archive_read_ahead(a, 1, &avail); - /* Bid 1 if we successfully read exactly zero bytes. */ - if (avail == 0) - return (1); - /* Otherwise, we don't bid on this. */ - return (-1); + h = __archive_read_ahead(a, 1, &avail); + if (avail != 0) + return (-1); + return (1); } static int |