aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-08-20 00:12:22 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-08-20 00:12:22 +0000
commit1c45a505eb109af13e5399c2b016acec4ad10421 (patch)
tree589faea46f22af74b5ac7e4cc31e1ddae6f7d0c7 /procps
parent6c4eb4411305f61b3f96eefe0ebb147c7f8e6c6d (diff)
downloadbusybox-w32-1c45a505eb109af13e5399c2b016acec4ad10421.tar.gz
busybox-w32-1c45a505eb109af13e5399c2b016acec4ad10421.tar.bz2
busybox-w32-1c45a505eb109af13e5399c2b016acec4ad10421.zip
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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/procps/top.c b/procps/top.c
index 1f1415f83..663eac674 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -763,8 +763,7 @@ int top_main(int argc UNUSED_PARAM, char **argv)
763 763
764 /* all args are options; -n NUM */ 764 /* all args are options; -n NUM */
765 opt_complementary = "-:n+"; 765 opt_complementary = "-:n+";
766 getopt32(argv, "d:n:b", &sinterval, &iterations); 766 if (getopt32(argv, "d:n:b", &sinterval, &iterations) & OPT_d) {
767 if (option_mask32 & OPT_d) {
768 /* Need to limit it to not overflow poll timeout */ 767 /* Need to limit it to not overflow poll timeout */
769 interval = xatou16(sinterval); // -d 768 interval = xatou16(sinterval); // -d
770 } 769 }