From 87d25a2b8535dc627a02eb539fa3946be2a24647 Mon Sep 17 00:00:00 2001 From: vda Date: Sun, 8 Oct 2006 12:49:22 +0000 Subject: attempt to regularize atoi mess. git-svn-id: svn://busybox.net/trunk/busybox@16342 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- procps/top.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'procps/top.c') 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) int top_main(int argc, char **argv) { int count, lines, col; - int interval = 5; /* default update rate is 5 seconds */ - int iterations = -1; /* 2^32 iterations by default :) */ + unsigned interval = 5; /* default update rate is 5 seconds */ + unsigned iterations = UINT_MAX; /* 2^32 iterations by default :) */ char *sinterval, *siterations; #ifdef CONFIG_FEATURE_USE_TERMIOS struct termios new_settings; @@ -399,8 +399,8 @@ int top_main(int argc, char **argv) opt_complementary = "-"; getopt32(argc, argv, "d:n:b", &sinterval, &siterations); - if (option_mask32 & 0x1) interval = atoi(sinterval); // -d - if (option_mask32 & 0x2) iterations = atoi(siterations); // -n + if (option_mask32 & 0x1) interval = xatou(sinterval); // -d + if (option_mask32 & 0x2) iterations = xatou(siterations); // -n //if (option_mask32 & 0x4) // -b /* change to /proc */ -- cgit v1.2.3-55-g6feb