attempt to regularize atoi mess.
[oweals/busybox.git] / miscutils / watchdog.c
index ae51aba7be584989261018ae68bb7b883bca1c3b..e342c13f3fc10d58f99f5a019a5fab7f9962e14c 100644 (file)
@@ -26,13 +26,13 @@ static void watchdog_shutdown(int ATTRIBUTE_UNUSED unused)
 int watchdog_main(int argc, char **argv)
 {
        unsigned opts;
-       unsigned long timer_duration = 30; /* Userspace timer duration, in seconds */
+       unsigned timer_duration = 30; /* Userspace timer duration, in seconds */
        char *t_arg;
 
        opts = getopt32(argc, argv, "Ft:", &t_arg);
 
        if (opts & OPT_TIMER)
-               timer_duration = bb_xgetlarg(t_arg, 10, 0, INT_MAX);
+               timer_duration = xatou(t_arg);
 
        /* We're only interested in the watchdog device .. */
        if (optind < argc - 1 || argc == 1)