diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-06-09 13:53:53 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-06-09 13:53:53 +0200 |
commit | 115ba7e0830a00a7b0bce5887c8ffeba78e3ab53 (patch) | |
tree | d376e30d5e830fc6292480203e7e39a6f9017243 /lib/tar/src/iterator.c | |
parent | 9a4110f3c205107a3a48a0e48b760abf3cd1f3bc (diff) |
libio: remove eof flag from istream_t interface
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/tar/src/iterator.c')
-rw-r--r-- | lib/tar/src/iterator.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; |