compress: fix error handling for lzma_lzma_preset()
Follow-up for 91d6f1ee53.
This commit is contained in:
@@ -482,9 +482,9 @@ static int compress_blob_xz(
|
||||
return r;
|
||||
|
||||
if (level >= 0) {
|
||||
r = sym_lzma_lzma_preset(&opt, (uint32_t) level);
|
||||
if (r < 0)
|
||||
return r;
|
||||
/* This returns lzma_bool, and true means failure, i.e. the specified level is not supported. */
|
||||
if (sym_lzma_lzma_preset(&opt, (uint32_t) level))
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Returns < 0 if we couldn't compress the data or the
|
||||
|
||||
Reference in New Issue
Block a user