diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-08 12:49:22 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-08 12:49:22 +0000 |
commit | 1385899416a4396385ad421ae1f532be7103738a (patch) | |
tree | fc4d14a910593d1235318bb36abe5e9f72d2039e /procps/kill.c | |
parent | 5625415085e68ac5e150f54e685417c866620d76 (diff) | |
download | busybox-w32-1385899416a4396385ad421ae1f532be7103738a.tar.gz busybox-w32-1385899416a4396385ad421ae1f532be7103738a.tar.bz2 busybox-w32-1385899416a4396385ad421ae1f532be7103738a.zip |
attempt to regularize atoi mess.
Diffstat (limited to 'procps/kill.c')
-rw-r--r-- | procps/kill.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/procps/kill.c b/procps/kill.c index 2408a70ca..b29f61b58 100644 --- a/procps/kill.c +++ b/procps/kill.c | |||
@@ -47,7 +47,7 @@ int kill_main(int argc, char **argv) | |||
47 | } else { /* -l <sig list> */ | 47 | } else { /* -l <sig list> */ |
48 | while ((arg = *++argv)!=NULL) { | 48 | while ((arg = *++argv)!=NULL) { |
49 | if (isdigit(arg[0])) { | 49 | if (isdigit(arg[0])) { |
50 | signo = atoi(arg); | 50 | signo = xatoi_u(arg); |
51 | name = get_signame(signo); | 51 | name = get_signame(signo); |
52 | } else { | 52 | } else { |
53 | signo = get_signum(arg); | 53 | signo = get_signum(arg); |
@@ -140,7 +140,7 @@ do_it_now: | |||
140 | while (arg) { | 140 | while (arg) { |
141 | if (!isdigit(arg[0]) && arg[0]!='-') | 141 | if (!isdigit(arg[0]) && arg[0]!='-') |
142 | bb_error_msg_and_die("bad pid '%s'", arg); | 142 | bb_error_msg_and_die("bad pid '%s'", arg); |
143 | pid = strtol(arg, NULL, 0); | 143 | pid = xatou(arg); |
144 | /* FIXME: better overflow check? */ | 144 | /* FIXME: better overflow check? */ |
145 | if (kill(pid, signo)!=0) { | 145 | if (kill(pid, signo)!=0) { |
146 | bb_perror_msg("cannot kill pid %ld", (long)pid); | 146 | bb_perror_msg("cannot kill pid %ld", (long)pid); |