From cf2fa9d3e5bd6b8ca3e1637080b665e896ea60a0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 18 Aug 2015 00:10:54 +0200 Subject: stream: provide a stream_get_size() convenience function And use it everywhere, instead of retrieving the size manually. Slight simplification. --- stream/stream_libarchive.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'stream/stream_libarchive.c') diff --git a/stream/stream_libarchive.c b/stream/stream_libarchive.c index 4dbb7bde08..475febc726 100644 --- a/stream/stream_libarchive.c +++ b/stream/stream_libarchive.c @@ -42,8 +42,7 @@ static ssize_t seek_cb(struct archive *arch, void *priv, offset += mpa->src->pos; break; case SEEK_END: ; - int64_t size = -1; - stream_control(mpa->src, STREAM_CTRL_GET_SIZE, &size); + int64_t size = stream_get_size(mpa->src); if (size < 0) return -1; offset += size; -- cgit v1.2.3