aboutsummaryrefslogtreecommitdiff
path: root/networking/arping.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/arping.c')
-rw-r--r--networking/arping.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/arping.c b/networking/arping.c
index 1ff6f90be..b9605985c 100644
--- a/networking/arping.c
+++ b/networking/arping.c
@@ -41,8 +41,8 @@ enum cfg_e {
41static int cfg; 41static int cfg;
42 42
43static int s; 43static int s;
44static int count = -1; 44static unsigned count = UINT_MAX;
45static int timeout; 45static unsigned timeout;
46static int sent; 46static int sent;
47static int brd_sent; 47static int brd_sent;
48static int received; 48static int received;
@@ -276,9 +276,9 @@ int arping_main(int argc, char **argv)
276 &_count, &_timeout, &device, &source); 276 &_count, &_timeout, &device, &source);
277 cfg |= opt & 0x3f; /* set respective flags */ 277 cfg |= opt & 0x3f; /* set respective flags */
278 if (opt & 0x40) /* -c: count */ 278 if (opt & 0x40) /* -c: count */
279 count = atoi(_count); 279 count = xatou(_count);
280 if (opt & 0x80) /* -w: timeout */ 280 if (opt & 0x80) /* -w: timeout */
281 timeout = atoi(_timeout); 281 timeout = xatoul_range(_timeout, 0, INT_MAX/2000);
282 if (opt & 0x100) { /* -i: interface */ 282 if (opt & 0x100) { /* -i: interface */
283 if (strlen(device) > IF_NAMESIZE) { 283 if (strlen(device) > IF_NAMESIZE) {
284 bb_error_msg_and_die("interface name '%s' is too long", 284 bb_error_msg_and_die("interface name '%s' is too long",