From: Denys Vlasenko Date: Thu, 20 Jul 2017 14:25:03 +0000 (+0200) Subject: bzcat,zcat: simplify code if gunzip/bunzip2 is not selected X-Git-Tag: 1_28_0~351 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ebe3c35d004463a423b0b9dc77a8a113a7353ba6;p=oweals%2Fbusybox.git bzcat,zcat: simplify code if gunzip/bunzip2 is not selected Signed-off-by: Denys Vlasenko --- diff --git a/archival/bbunzip.c b/archival/bbunzip.c index 786a81f2c..94698d902 100644 --- a/archival/bbunzip.c +++ b/archival/bbunzip.c @@ -398,7 +398,7 @@ int gunzip_main(int argc UNUSED_PARAM, char **argv) * Normally, "zcat" is just "gunzip -c". * But if seamless magic is enabled, then we are much more clever. */ - if (ENABLE_ZCAT && applet_name[1] == 'c') + if (ENABLE_ZCAT && (!ENABLE_GUNZIP || applet_name[1] == 'c')) option_mask32 |= OPT_STDOUT | SEAMLESS_MAGIC; return bbunpack(argv, unpack_gz_stream, make_new_name_gunzip, /*unused:*/ NULL); @@ -454,7 +454,7 @@ int bunzip2_main(int argc UNUSED_PARAM, char **argv) { getopt32(argv, "cfkvqdt"); argv += optind; - if (ENABLE_BZCAT && applet_name[2] == 'c') /* bzcat */ + if (ENABLE_BZCAT && (!ENABLE_BUNZIP2 || applet_name[2] == 'c')) /* bzcat */ option_mask32 |= OPT_STDOUT; return bbunpack(argv, unpack_bz2_stream, make_new_name_generic, "bz2");