aboutsummaryrefslogtreecommitdiff
path: root/lib/tar
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-06-11 15:40:26 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-06-11 15:40:26 +0200
commit366ccf20745b23f1eb8554cbe17e6972271de002 (patch)
tree93951efe96966db4c766c140431dd017fd15cf80 /lib/tar
parentad1691aa33cfc1b1558ce10e93552d0eb1cdcd63 (diff)
libio: remove precache from istream_advance_buffer
Since the user has to call istream_get_buffered_data afterwards anyway, we can do the precache lazily. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/tar')
-rw-r--r--lib/tar/src/iterator.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/tar/src/iterator.c b/lib/tar/src/iterator.c
index f46a9c2..df5c446 100644
--- a/lib/tar/src/iterator.c
+++ b/lib/tar/src/iterator.c
@@ -109,9 +109,7 @@ static int strm_precache(istream_t *strm)
return tar->state;
if (!tar->parent->last_sparse) {
- int ret = istream_advance_buffer(tar->parent->stream, diff);
- if (ret != 0)
- return ret;
+ istream_advance_buffer(tar->parent->stream, diff);
tar->parent->record_size -= diff;
}