aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/tar2sqfs/src/tar2sqfs.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/bin/tar2sqfs/src/tar2sqfs.c b/bin/tar2sqfs/src/tar2sqfs.c
index 9257fed..1145675 100644
--- a/bin/tar2sqfs/src/tar2sqfs.c
+++ b/bin/tar2sqfs/src/tar2sqfs.c
@@ -36,22 +36,17 @@ static istream_t *magic_autowrap(istream_t *strm)
{
xfrm_stream_t *xfrm = NULL;
istream_t *wrapper = NULL;
- const sqfs_u8 *data;
- size_t avail;
int ret;
ret = istream_precache(strm);
if (ret != 0)
goto out;
- data = strm->buffer + strm->buffer_offset;
- avail = strm->buffer_used - strm->buffer_offset;
-
- ret = tar_probe(data, avail);
+ ret = tar_probe(strm->buffer, strm->buffer_used);
if (ret > 0)
return strm;
- ret = xfrm_compressor_id_from_magic(data, avail);
+ ret = xfrm_compressor_id_from_magic(strm->buffer, strm->buffer_used);
if (ret <= 0)
return strm;