summaryrefslogtreecommitdiff
path: root/lib/sqfs/comp/gzip.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-11-24 16:36:20 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-11-24 16:47:49 +0100
commit162142b7930248d83a77e8d8f4eba5896d5b267a (patch)
treef65796333f80b4f710a19f5fcb6770d6aedbafe6 /lib/sqfs/comp/gzip.c
parentdea3b64dd11a3a3391bd9d8f8c26f20392e7eb3c (diff)
Cleanup libsquashfs invalid argument error codes
- Add an explicit "you're holding it wrong" error code. - Consistently return error codes and not have some special places where -1 is returned. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/comp/gzip.c')
-rw-r--r--lib/sqfs/comp/gzip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqfs/comp/gzip.c b/lib/sqfs/comp/gzip.c
index 3886e60..7183e5a 100644
--- a/lib/sqfs/comp/gzip.c
+++ b/lib/sqfs/comp/gzip.c
@@ -156,7 +156,7 @@ static sqfs_s32 gzip_do_block(sqfs_compressor_t *base, const sqfs_u8 *in,
size_t written;
if (size >= 0x7FFFFFFF)
- return 0;
+ return SQFS_ERROR_ARG_INVALID;
if (gzip->compress && gzip->opt.strategies != 0) {
strategy = find_strategy(gzip, in, size, out, outsize);