aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-07-20 16:25:03 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-07-20 16:25:03 +0200
commitebe3c35d004463a423b0b9dc77a8a113a7353ba6 (patch)
tree62c4b9408398a9731eabbef5fb0269b2d2be77ee
parenteae12688c9bb056b21e4e62fc295be5ebdcb8b7b (diff)
downloadbusybox-w32-ebe3c35d004463a423b0b9dc77a8a113a7353ba6.tar.gz
busybox-w32-ebe3c35d004463a423b0b9dc77a8a113a7353ba6.tar.bz2
busybox-w32-ebe3c35d004463a423b0b9dc77a8a113a7353ba6.zip
bzcat,zcat: simplify code if gunzip/bunzip2 is not selected
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--archival/bbunzip.c4
1 files changed, 2 insertions, 2 deletions
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)
398 * Normally, "zcat" is just "gunzip -c". 398 * Normally, "zcat" is just "gunzip -c".
399 * But if seamless magic is enabled, then we are much more clever. 399 * But if seamless magic is enabled, then we are much more clever.
400 */ 400 */
401 if (ENABLE_ZCAT && applet_name[1] == 'c') 401 if (ENABLE_ZCAT && (!ENABLE_GUNZIP || applet_name[1] == 'c'))
402 option_mask32 |= OPT_STDOUT | SEAMLESS_MAGIC; 402 option_mask32 |= OPT_STDOUT | SEAMLESS_MAGIC;
403 403
404 return bbunpack(argv, unpack_gz_stream, make_new_name_gunzip, /*unused:*/ NULL); 404 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)
454{ 454{
455 getopt32(argv, "cfkvqdt"); 455 getopt32(argv, "cfkvqdt");
456 argv += optind; 456 argv += optind;
457 if (ENABLE_BZCAT && applet_name[2] == 'c') /* bzcat */ 457 if (ENABLE_BZCAT && (!ENABLE_BUNZIP2 || applet_name[2] == 'c')) /* bzcat */
458 option_mask32 |= OPT_STDOUT; 458 option_mask32 |= OPT_STDOUT;
459 459
460 return bbunpack(argv, unpack_bz2_stream, make_new_name_generic, "bz2"); 460 return bbunpack(argv, unpack_bz2_stream, make_new_name_generic, "bz2");