From 1385899416a4396385ad421ae1f532be7103738a Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sun, 8 Oct 2006 12:49:22 +0000 Subject: attempt to regularize atoi mess. --- console-tools/chvt.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'console-tools/chvt.c') diff --git a/console-tools/chvt.c b/console-tools/chvt.c index aff66e007..bbc5a9c31 100644 --- a/console-tools/chvt.c +++ b/console-tools/chvt.c @@ -7,11 +7,6 @@ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ -#include -#include -#include -#include -#include #include "busybox.h" /* From */ @@ -29,7 +24,7 @@ int chvt_main(int argc, char **argv) } fd = get_console_fd(); - num = bb_xgetlarg(argv[1], 10, 0, INT_MAX); + num = xatoul_range(argv[1], 1, 63); if ((-1 == ioctl(fd, VT_ACTIVATE, num)) || (-1 == ioctl(fd, VT_WAITACTIVE, num))) { bb_perror_msg_and_die("ioctl"); -- cgit v1.2.3-55-g6feb