aboutsummaryrefslogtreecommitdiff
path: root/networking/ifconfig.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-03-06 22:11:45 +0000
committerEric Andersen <andersen@codepoet.org>2004-03-06 22:11:45 +0000
commit2479445562a9b5a9f226d0b00c41dbd533e63213 (patch)
treee4891420283c085d688683a41cc217dc896917b8 /networking/ifconfig.c
parentc4db0833a6c91dd3714bec1db076a80910af6e30 (diff)
downloadbusybox-2479445562a9b5a9f226d0b00c41dbd533e63213.tar.gz
Fix/eliminate use of atol
Diffstat (limited to 'networking/ifconfig.c')
-rw-r--r--networking/ifconfig.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/networking/ifconfig.c b/networking/ifconfig.c
index 9fdab3c3f..341998d8d 100644
--- a/networking/ifconfig.c
+++ b/networking/ifconfig.c
@@ -15,7 +15,7 @@
* Foundation; either version 2 of the License, or (at
* your option) any later version.
*
- * $Id: ifconfig.c,v 1.27 2003/11/14 03:04:08 andersen Exp $
+ * $Id: ifconfig.c,v 1.28 2004/03/06 22:11:44 andersen Exp $
*
*/
@@ -394,8 +394,9 @@ int ifconfig_main(int argc, char **argv)
safe_strncpy(host, *argv, (sizeof host));
#ifdef CONFIG_FEATURE_IPV6
if ((prefix = strchr(host, '/'))) {
- prefix_len = atol(prefix + 1);
- if ((prefix_len < 0) || (prefix_len > 128)) {
+ if (safe_strtoi(prefix + 1, &prefix_len) ||
+ (prefix_len < 0) || (prefix_len > 128))
+ {
++goterr;
goto LOOP;
}