aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2023-04-03 19:29:57 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2023-04-03 19:29:57 +0200
commitff8fde111e11e973b269467dd86f235a27f653df (patch)
tree6b026056623bdba53337bd6b9497f4a1f1a028f1
parent46e92e1e568021ecdfa30bfea0efabe72b85633b (diff)
downloadbusybox-w32-ff8fde111e11e973b269467dd86f235a27f653df.tar.gz
busybox-w32-ff8fde111e11e973b269467dd86f235a27f653df.tar.bz2
busybox-w32-ff8fde111e11e973b269467dd86f235a27f653df.zip
hush: printf builtin with no arguments should not exit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--coreutils/printf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/printf.c b/coreutils/printf.c
index 2e672d15f..b89df67f9 100644
--- a/coreutils/printf.c
+++ b/coreutils/printf.c
@@ -428,7 +428,7 @@ int printf_main(int argc UNUSED_PARAM, char **argv)
428 if (argv[1] && argv[1][0] == '-' && argv[1][1] == '-' && !argv[1][2]) 428 if (argv[1] && argv[1][0] == '-' && argv[1][1] == '-' && !argv[1][2])
429 argv++; 429 argv++;
430 if (!argv[1]) { 430 if (!argv[1]) {
431 if (ENABLE_ASH_PRINTF 431 if ((ENABLE_ASH_PRINTF || ENABLE_HUSH_PRINTF)
432 && applet_name[0] != 'p' 432 && applet_name[0] != 'p'
433 ) { 433 ) {
434 bb_simple_error_msg("usage: printf FORMAT [ARGUMENT...]"); 434 bb_simple_error_msg("usage: printf FORMAT [ARGUMENT...]");