From 115ba7e0830a00a7b0bce5887c8ffeba78e3ab53 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 9 Jun 2023 13:53:53 +0200 Subject: libio: remove eof flag from istream_t interface Signed-off-by: David Oberhollenzer --- lib/tar/src/iterator.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/tar') diff --git a/lib/tar/src/iterator.c b/lib/tar/src/iterator.c index 2914e3a..442ddeb 100644 --- a/lib/tar/src/iterator.c +++ b/lib/tar/src/iterator.c @@ -39,6 +39,7 @@ typedef struct { tar_iterator_t *parent; + bool eof; sqfs_u8 buffer[4096]; } tar_istream_t; @@ -85,7 +86,7 @@ static int strm_precache(istream_t *strm) tar_istream_t *tar = (tar_istream_t *)strm; sqfs_u64 diff; - if (strm->eof) + if (tar->eof) goto out_eof; if (!tar->parent->last_sparse) { @@ -146,7 +147,7 @@ fail_io: tar->parent->state = SQFS_ERROR_IO; return -1; out_eof: - strm->eof = true; + tar->eof = true; strm->buffer_used = 0; strm->buffer = tar->buffer; tar->parent->locked = false; -- cgit v1.2.3