diff options
author | Denis Vlasenko | 2008-08-20 00:12:22 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-08-20 00:12:22 +0000 |
commit | 1c45a505eb109af13e5399c2b016acec4ad10421 (patch) | |
tree | 589faea46f22af74b5ac7e4cc31e1ddae6f7d0c7 /procps | |
parent | 6c4eb4411305f61b3f96eefe0ebb147c7f8e6c6d (diff) | |
download | busybox-1c45a505eb109af13e5399c2b016acec4ad10421.zip busybox-1c45a505eb109af13e5399c2b016acec4ad10421.tar.gz |
libbb: fix mishandling of "all argv are opts" in getopt32()
function old new delta
top_main 1100 1095 -5
getopt32 1398 1361 -37
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-42) Total: -42 bytes
Diffstat (limited to 'procps')
-rw-r--r-- | procps/top.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/procps/top.c b/procps/top.c index 1f1415f..663eac6 100644 --- a/procps/top.c +++ b/procps/top.c @@ -763,8 +763,7 @@ int top_main(int argc UNUSED_PARAM, char **argv) /* all args are options; -n NUM */ opt_complementary = "-:n+"; - getopt32(argv, "d:n:b", &sinterval, &iterations); - if (option_mask32 & OPT_d) { + if (getopt32(argv, "d:n:b", &sinterval, &iterations) & OPT_d) { /* Need to limit it to not overflow poll timeout */ interval = xatou16(sinterval); // -d } |