From 366ccf20745b23f1eb8554cbe17e6972271de002 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 11 Jun 2023 15:40:26 +0200 Subject: 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 --- lib/tar/src/iterator.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/tar') 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; } -- cgit v1.2.3