diff options
Diffstat (limited to 'init/init.c')
-rw-r--r-- | init/init.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/init/init.c b/init/init.c index 1145c0490..6d4969c4b 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -818,14 +818,14 @@ static void reload_signal(int sig ATTRIBUTE_UNUSED) | |||
818 | } | 818 | } |
819 | 819 | ||
820 | int init_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 820 | int init_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
821 | int init_main(int argc, char **argv) | 821 | int init_main(int argc ATTRIBUTE_UNUSED, char **argv) |
822 | { | 822 | { |
823 | struct init_action *a; | 823 | struct init_action *a; |
824 | pid_t wpid; | 824 | pid_t wpid; |
825 | 825 | ||
826 | die_sleep = 30 * 24*60*60; /* if xmalloc will ever die... */ | 826 | die_sleep = 30 * 24*60*60; /* if xmalloc will ever die... */ |
827 | 827 | ||
828 | if (argc > 1 && !strcmp(argv[1], "-q")) { | 828 | if (argv[1] && !strcmp(argv[1], "-q")) { |
829 | return kill(1, SIGHUP); | 829 | return kill(1, SIGHUP); |
830 | } | 830 | } |
831 | 831 | ||
@@ -868,7 +868,7 @@ int init_main(int argc, char **argv) | |||
868 | putenv((char *) *e); | 868 | putenv((char *) *e); |
869 | } | 869 | } |
870 | 870 | ||
871 | if (argc > 1) setenv("RUNLEVEL", argv[1], 1); | 871 | if (argv[1]) setenv("RUNLEVEL", argv[1], 1); |
872 | 872 | ||
873 | /* Hello world */ | 873 | /* Hello world */ |
874 | message(MAYBE_CONSOLE | L_LOG, "init started: %s", bb_banner); | 874 | message(MAYBE_CONSOLE | L_LOG, "init started: %s", bb_banner); |
@@ -890,7 +890,7 @@ int init_main(int argc, char **argv) | |||
890 | } | 890 | } |
891 | 891 | ||
892 | /* Check if we are supposed to be in single user mode */ | 892 | /* Check if we are supposed to be in single user mode */ |
893 | if (argc > 1 | 893 | if (argv[1] |
894 | && (!strcmp(argv[1], "single") || !strcmp(argv[1], "-s") || LONE_CHAR(argv[1], '1')) | 894 | && (!strcmp(argv[1], "single") || !strcmp(argv[1], "-s") || LONE_CHAR(argv[1], '1')) |
895 | ) { | 895 | ) { |
896 | /* Start a shell on console */ | 896 | /* Start a shell on console */ |