summaryrefslogtreecommitdiff
path: root/networking/route.c
diff options
context:
space:
mode:
authorEric Andersen2004-03-06 22:11:45 +0000
committerEric Andersen2004-03-06 22:11:45 +0000
commit2479445562a9b5a9f226d0b00c41dbd533e63213 (patch)
treee4891420283c085d688683a41cc217dc896917b8 /networking/route.c
parentc4db0833a6c91dd3714bec1db076a80910af6e30 (diff)
downloadbusybox-2479445562a9b5a9f226d0b00c41dbd533e63213.zip
busybox-2479445562a9b5a9f226d0b00c41dbd533e63213.tar.gz
Fix/eliminate use of atol
Diffstat (limited to 'networking/route.c')
-rw-r--r--networking/route.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/networking/route.c b/networking/route.c
index 083149a..19942f4 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -15,7 +15,7 @@
* Foundation; either version 2 of the License, or (at
* your option) any later version.
*
- * $Id: route.c,v 1.22 2003/03/19 09:12:39 mjn3 Exp $
+ * $Id: route.c,v 1.23 2004/03/06 22:11:44 andersen Exp $
*
* displayroute() code added by Vladimir N. Oleynik <dzo@simtreas.ru>
* adjustments by Larry Doolittle <LRDoolittle@lbl.gov>
@@ -351,8 +351,7 @@ static int INET6_setroute(int action, int options, char **args)
memset(&sa6, 0, sizeof(sa6));
} else {
if ((cp = strchr(target, '/'))) {
- prefix_len = atol(cp + 1);
- if ((prefix_len < 0) || (prefix_len > 128))
+ if (safe_strtod(cp + 1, &prefix_len) || (prefix_len < 0) || (prefix_len > 128))
bb_show_usage();
*cp = 0;
} else {