diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2023-10-02 13:56:32 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2023-10-02 13:56:32 +0200 |
commit | 791b222dd55d3aa0e8b09be1be571e4829465dd6 (patch) | |
tree | 64af8d2c7a5787055bacb15c8a9f20ed51c2732f /coreutils/sleep.c | |
parent | 2cc9d436e80632157b99e18d413a62b2d44d321a (diff) | |
download | busybox-w32-791b222dd55d3aa0e8b09be1be571e4829465dd6.tar.gz busybox-w32-791b222dd55d3aa0e8b09be1be571e4829465dd6.tar.bz2 busybox-w32-791b222dd55d3aa0e8b09be1be571e4829465dd6.zip |
sleep: fix "sleep -- ARGS"
function old new delta
sleep_main 116 119 +3
printf_main 860 837 -23
single_argv 50 25 -25
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 3/-48) Total: -45 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/sleep.c')
-rw-r--r-- | coreutils/sleep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/sleep.c b/coreutils/sleep.c index 6edff59cc..fa74f1fd4 100644 --- a/coreutils/sleep.c +++ b/coreutils/sleep.c | |||
@@ -71,8 +71,8 @@ int sleep_main(int argc UNUSED_PARAM, char **argv) | |||
71 | * + we can't use bb_show_usage | 71 | * + we can't use bb_show_usage |
72 | * + applet_name can be the name of the shell | 72 | * + applet_name can be the name of the shell |
73 | */ | 73 | */ |
74 | ++argv; | 74 | argv = skip_dash_dash(argv); |
75 | if (!*argv) { | 75 | if (!argv[0]) { |
76 | /* Without this, bare "sleep" in ash shows _ash_ --help */ | 76 | /* Without this, bare "sleep" in ash shows _ash_ --help */ |
77 | /* (ash can be the "sh" applet as well, so check 2nd char) */ | 77 | /* (ash can be the "sh" applet as well, so check 2nd char) */ |
78 | if (ENABLE_ASH_SLEEP && applet_name[1] != 'l') { | 78 | if (ENABLE_ASH_SLEEP && applet_name[1] != 'l') { |