diff options
author | Denis Vlasenko | 2006-10-08 12:49:22 +0000 |
---|---|---|
committer | Denis Vlasenko | 2006-10-08 12:49:22 +0000 |
commit | 1385899416a4396385ad421ae1f532be7103738a (patch) | |
tree | fc4d14a910593d1235318bb36abe5e9f72d2039e /networking/arping.c | |
parent | 5625415085e68ac5e150f54e685417c866620d76 (diff) | |
download | busybox-1385899416a4396385ad421ae1f532be7103738a.zip busybox-1385899416a4396385ad421ae1f532be7103738a.tar.gz |
attempt to regularize atoi mess.
Diffstat (limited to 'networking/arping.c')
-rw-r--r-- | networking/arping.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/arping.c b/networking/arping.c index 1ff6f90..b960598 100644 --- a/networking/arping.c +++ b/networking/arping.c @@ -41,8 +41,8 @@ enum cfg_e { static int cfg; static int s; -static int count = -1; -static int timeout; +static unsigned count = UINT_MAX; +static unsigned timeout; static int sent; static int brd_sent; static int received; @@ -276,9 +276,9 @@ int arping_main(int argc, char **argv) &_count, &_timeout, &device, &source); cfg |= opt & 0x3f; /* set respective flags */ if (opt & 0x40) /* -c: count */ - count = atoi(_count); + count = xatou(_count); if (opt & 0x80) /* -w: timeout */ - timeout = atoi(_timeout); + timeout = xatoul_range(_timeout, 0, INT_MAX/2000); if (opt & 0x100) { /* -i: interface */ if (strlen(device) > IF_NAMESIZE) { bb_error_msg_and_die("interface name '%s' is too long", |