aboutsummaryrefslogtreecommitdiff
path: root/procps/top.c
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-10-08 12:49:22 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-10-08 12:49:22 +0000
commit87d25a2b8535dc627a02eb539fa3946be2a24647 (patch)
treefc4d14a910593d1235318bb36abe5e9f72d2039e /procps/top.c
parent81177b14907e73f11560f69e0b4ec34371f1a7d5 (diff)
downloadbusybox-w32-87d25a2b8535dc627a02eb539fa3946be2a24647.tar.gz
busybox-w32-87d25a2b8535dc627a02eb539fa3946be2a24647.tar.bz2
busybox-w32-87d25a2b8535dc627a02eb539fa3946be2a24647.zip
attempt to regularize atoi mess.
git-svn-id: svn://busybox.net/trunk/busybox@16342 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'procps/top.c')
-rw-r--r--procps/top.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/procps/top.c b/procps/top.c
index be1c45faa..14a3870a1 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -384,8 +384,8 @@ static void sig_catcher(int sig ATTRIBUTE_UNUSED)
384int top_main(int argc, char **argv) 384int top_main(int argc, char **argv)
385{ 385{
386 int count, lines, col; 386 int count, lines, col;
387 int interval = 5; /* default update rate is 5 seconds */ 387 unsigned interval = 5; /* default update rate is 5 seconds */
388 int iterations = -1; /* 2^32 iterations by default :) */ 388 unsigned iterations = UINT_MAX; /* 2^32 iterations by default :) */
389 char *sinterval, *siterations; 389 char *sinterval, *siterations;
390#ifdef CONFIG_FEATURE_USE_TERMIOS 390#ifdef CONFIG_FEATURE_USE_TERMIOS
391 struct termios new_settings; 391 struct termios new_settings;
@@ -399,8 +399,8 @@ int top_main(int argc, char **argv)
399 opt_complementary = "-"; 399 opt_complementary = "-";
400 getopt32(argc, argv, "d:n:b", 400 getopt32(argc, argv, "d:n:b",
401 &sinterval, &siterations); 401 &sinterval, &siterations);
402 if (option_mask32 & 0x1) interval = atoi(sinterval); // -d 402 if (option_mask32 & 0x1) interval = xatou(sinterval); // -d
403 if (option_mask32 & 0x2) iterations = atoi(siterations); // -n 403 if (option_mask32 & 0x2) iterations = xatou(siterations); // -n
404 //if (option_mask32 & 0x4) // -b 404 //if (option_mask32 & 0x4) // -b
405 405
406 /* change to /proc */ 406 /* change to /proc */