summaryrefslogtreecommitdiff
path: root/coreutils/tty.c
diff options
context:
space:
mode:
authorDenys Vlasenko2010-01-04 13:16:08 +0100
committerDenys Vlasenko2010-01-04 13:16:08 +0100
commita355da07756e529c112249653ed5af0e2d910728 (patch)
tree3b36dd1ec8618a39c8324bcfdca77f6f8f497a18 /coreutils/tty.c
parenta4899efd03d2fdaaf3f581d89a7a4844832d3fbb (diff)
downloadbusybox-a355da07756e529c112249653ed5af0e2d910728.zip
busybox-a355da07756e529c112249653ed5af0e2d910728.tar.gz
*: make 2 more "int argc"'s unused; more saved if !DESKTOP
function old new delta sync_main 18 20 +2 tty_main 90 87 -3 iprule_list 83 79 -4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/tty.c')
-rw-r--r--coreutils/tty.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/coreutils/tty.c b/coreutils/tty.c
index 975ccdf..69352ec 100644
--- a/coreutils/tty.c
+++ b/coreutils/tty.c
@@ -13,7 +13,7 @@
#include "libbb.h"
int tty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int tty_main(int argc, char **argv IF_NOT_INCLUDE_SUSv2(UNUSED_PARAM))
+int tty_main(int argc UNUSED_PARAM, char **argv)
{
const char *s;
IF_INCLUDE_SUSv2(int silent;) /* Note: No longer relevant in SUSv3. */
@@ -22,11 +22,11 @@ int tty_main(int argc, char **argv IF_NOT_INCLUDE_SUSv2(UNUSED_PARAM))
xfunc_error_retval = 2; /* SUSv3 requires > 1 for error. */
IF_INCLUDE_SUSv2(silent = getopt32(argv, "s");)
- IF_INCLUDE_SUSv2(argc -= optind;)
- IF_NOT_INCLUDE_SUSv2(argc -= 1;)
+ IF_INCLUDE_SUSv2(argv += optind;)
+ IF_NOT_INCLUDE_SUSv2(argv += 1;)
/* gnu tty outputs a warning that it is ignoring all args. */
- bb_warn_ignoring_args(argc);
+ bb_warn_ignoring_args(argv[0]);
retval = EXIT_SUCCESS;