From e992bae6f9adf3718c6263a36c004ead1c7272a8 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sat, 28 Nov 2009 15:18:53 +0100 Subject: *: remove a few more cases of argc usage. -89 bytes. Signed-off-by: Denys Vlasenko --- miscutils/adjtimex.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'miscutils/adjtimex.c') diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c index 07f083428..c12a10b25 100644 --- a/miscutils/adjtimex.c +++ b/miscutils/adjtimex.c @@ -56,7 +56,7 @@ static const char ret_code_descript[] = ; int adjtimex_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int adjtimex_main(int argc, char **argv) +int adjtimex_main(int argc UNUSED_PARAM, char **argv) { enum { OPT_quiet = 0x1 @@ -66,10 +66,11 @@ int adjtimex_main(int argc, char **argv) struct timex txc; int i, ret; const char *descript; - txc.modes=0; + opt_complementary = "=0"; /* no valid non-option parameters */ opt = getopt32(argv, "qo:f:p:t:", &opt_o, &opt_f, &opt_p, &opt_t); + txc.modes = 0; //if (opt & 0x1) // -q if (opt & 0x2) { // -o txc.offset = xatol(opt_o); @@ -87,9 +88,6 @@ int adjtimex_main(int argc, char **argv) txc.tick = xatol(opt_t); txc.modes |= ADJ_TICK; } - if (argc != optind) { /* no valid non-option parameters */ - bb_show_usage(); - } ret = adjtimex(&txc); -- cgit v1.2.3