aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorGravatar Denis Vlasenko <vda.linux@googlemail.com>2006-12-21 13:23:14 +0000
committerGravatar Denis Vlasenko <vda.linux@googlemail.com>2006-12-21 13:23:14 +0000
commitbf66fbc8e2380717c1fab860cfc60c78582839dd (patch)
tree3ab3dd4df901851ff7f4345708592118766ba4aa /init
parent6910741067913d131d931b1e6424d3b8ed43e64f (diff)
downloadbusybox-bf66fbc8e2380717c1fab860cfc60c78582839dd.tar.gz
busybox-bf66fbc8e2380717c1fab860cfc60c78582839dd.tar.bz2
introduce LONE_CHAR (optimized strcmp with one-char string)
Diffstat (limited to 'init')
-rw-r--r--init/init.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/init/init.c b/init/init.c
index 213a5c149..bc53feeae 100644
--- a/init/init.c
+++ b/init/init.c
@@ -1047,8 +1047,9 @@ int init_main(int argc, char **argv)
}
/* Check if we are supposed to be in single user mode */
- if (argc > 1 && (!strcmp(argv[1], "single") ||
- !strcmp(argv[1], "-s") || !strcmp(argv[1], "1"))) {
+ if (argc > 1
+ && (!strcmp(argv[1], "single") || !strcmp(argv[1], "-s") || LONE_CHAR(argv[1], '1'))
+ ) {
/* Start a shell on console */
new_init_action(RESPAWN, bb_default_login_shell, "");
} else {