compress: fix error handling for lzma_lzma_preset()

Follow-up for 91d6f1ee53.
This commit is contained in:
Yu Watanabe
2026-08-27 04:34:34 +09:00
parent fb1160c588
commit d365c4cd52
+3 -3
View File
@@ -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