Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/sleep.c')
-rw-r--r--coreutils/sleep.c4
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)
* + we can't use bb_show_usage
* + applet_name can be the name of the shell
*/
- ++argv;
- if (!*argv) {
+ argv = skip_dash_dash(argv);
+ if (!argv[0]) {
/* Without this, bare "sleep" in ash shows _ash_ --help */
/* (ash can be the "sh" applet as well, so check 2nd char) */
if (ENABLE_ASH_SLEEP && applet_name[1] != 'l') {