summaryrefslogtreecommitdiff
path: root/loginutils/sulogin.c
diff options
context:
space:
mode:
authorDenis Vlasenko2008-11-09 00:15:11 +0000
committerDenis Vlasenko2008-11-09 00:15:11 +0000
commit3fa36e235021af5810333a52876d29efc661ad60 (patch)
tree71249d42a3a17ebf3c166826b71fe1453dcb6756 /loginutils/sulogin.c
parent73cc54388daeae391698b8afe788f421cf9e394d (diff)
downloadbusybox-3fa36e235021af5810333a52876d29efc661ad60.zip
busybox-3fa36e235021af5810333a52876d29efc661ad60.tar.gz
*: 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/sulogin.c')
-rw-r--r--loginutils/sulogin.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c
index bfd4256..892c434 100644
--- a/loginutils/sulogin.c
+++ b/loginutils/sulogin.c
@@ -32,11 +32,12 @@ int sulogin_main(int argc UNUSED_PARAM, char **argv)
opt_complementary = "t+"; /* -t N */
getopt32(argv, "t:", &timeout);
+ argv += optind;
- if (argv[optind]) {
+ if (argv[0]) {
close(0);
close(1);
- dup(xopen(argv[optind], O_RDWR));
+ dup(xopen(argv[0], O_RDWR));
close(2);
dup(0);
}