summaryrefslogtreecommitdiff
path: root/lib/common/comp_opt.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common/comp_opt.c')
-rw-r--r--lib/common/comp_opt.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/lib/common/comp_opt.c b/lib/common/comp_opt.c
index 8864a0e..5be4466 100644
--- a/lib/common/comp_opt.c
+++ b/lib/common/comp_opt.c
@@ -185,29 +185,10 @@ int compressor_cfg_init_options(sqfs_compressor_config_t *cfg,
goto fail_level;
level = atoi(value);
-
if (level < min_level || level > max_level)
goto fail_level;
- switch (cfg->id) {
- case SQFS_COMP_GZIP:
- cfg->opt.gzip.level = level;
- break;
- case SQFS_COMP_LZO:
- cfg->opt.lzo.level = level;
- break;
- case SQFS_COMP_ZSTD:
- cfg->opt.zstd.level = level;
- break;
- case SQFS_COMP_XZ:
- cfg->opt.xz.level = level;
- break;
- case SQFS_COMP_LZMA:
- cfg->opt.lzma.level = level;
- break;
- default:
- goto fail_opt;
- }
+ cfg->level = level;
break;
case OPT_ALG:
if (cfg->id != SQFS_COMP_LZO)