diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-11-09 00:15:11 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-11-09 00:15:11 +0000 |
commit | 3fa36e235021af5810333a52876d29efc661ad60 (patch) | |
tree | 71249d42a3a17ebf3c166826b71fe1453dcb6756 /loginutils | |
parent | 73cc54388daeae391698b8afe788f421cf9e394d (diff) | |
download | busybox-w32-3fa36e235021af5810333a52876d29efc661ad60.tar.gz busybox-w32-3fa36e235021af5810333a52876d29efc661ad60.tar.bz2 busybox-w32-3fa36e235021af5810333a52876d29efc661ad60.zip |
*: a bit of code shrink
function old new delta
stop_handler 41 38 -3
sulogin_main 508 504 -4
got_cont 4 - -4
cont_handler 11 - -11
startservice 309 297 -12
processorstart 423 409 -14
tcpudpsvd_main 1861 1843 -18
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 0/5 up/down: 0/-66) Total: -66 bytes
Diffstat (limited to 'loginutils')
-rw-r--r-- | loginutils/login.c | 4 | ||||
-rw-r--r-- | loginutils/sulogin.c | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/loginutils/login.c b/loginutils/login.c index 70e3b1333..a18b4d5d7 100644 --- a/loginutils/login.c +++ b/loginutils/login.c | |||
@@ -486,8 +486,8 @@ int login_main(int argc UNUSED_PARAM, char **argv) | |||
486 | // If this stuff is really needed, add it and explain why! | 486 | // If this stuff is really needed, add it and explain why! |
487 | 487 | ||
488 | /* Set signals to defaults */ | 488 | /* Set signals to defaults */ |
489 | /*signal(SIGALRM, SIG_DFL); - not needed, we already set it | 489 | /* Non-ignored signals revert to SIG_DFL on exec anyway */ |
490 | * to non-SIG_IGN, and on exec such signals are reset to SIG_DFL */ | 490 | /*signal(SIGALRM, SIG_DFL);*/ |
491 | 491 | ||
492 | /* Is this correct? This way user can ctrl-c out of /etc/profile, | 492 | /* Is this correct? This way user can ctrl-c out of /etc/profile, |
493 | * potentially creating security breach (tested with bash 3.0). | 493 | * potentially creating security breach (tested with bash 3.0). |
diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c index bfd42569a..892c43484 100644 --- a/loginutils/sulogin.c +++ b/loginutils/sulogin.c | |||
@@ -32,11 +32,12 @@ int sulogin_main(int argc UNUSED_PARAM, char **argv) | |||
32 | 32 | ||
33 | opt_complementary = "t+"; /* -t N */ | 33 | opt_complementary = "t+"; /* -t N */ |
34 | getopt32(argv, "t:", &timeout); | 34 | getopt32(argv, "t:", &timeout); |
35 | argv += optind; | ||
35 | 36 | ||
36 | if (argv[optind]) { | 37 | if (argv[0]) { |
37 | close(0); | 38 | close(0); |
38 | close(1); | 39 | close(1); |
39 | dup(xopen(argv[optind], O_RDWR)); | 40 | dup(xopen(argv[0], O_RDWR)); |
40 | close(2); | 41 | close(2); |
41 | dup(0); | 42 | dup(0); |
42 | } | 43 | } |