summaryrefslogtreecommitdiff
path: root/networking/route.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-11-06 02:23:39 +0000
committerDenis Vlasenko2007-11-06 02:23:39 +0000
commit1bec1b980e3cf5ad604fb0c2038a3ab83d9ab5f5 (patch)
tree924352d9309f62c733927506ed08086a2880556c /networking/route.c
parentcd0fbb5e778e3cef7f88b71a55b673cbdf7cee85 (diff)
downloadbusybox-1bec1b980e3cf5ad604fb0c2038a3ab83d9ab5f5.zip
busybox-1bec1b980e3cf5ad604fb0c2038a3ab83d9ab5f5.tar.gz
telnet: use poll, it's shorter
*: style fixes
Diffstat (limited to 'networking/route.c')
-rw-r--r--networking/route.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/networking/route.c b/networking/route.c
index 3425e63..6f945b9 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -352,9 +352,10 @@ static void INET6_setroute(int action, char **args)
memset(&sa6, 0, sizeof(sa6));
} else {
char *cp;
- if ((cp = strchr(target, '/'))) { /* Yes... const to non is ok. */
- *cp = 0;
- prefix_len = xatoul_range(cp+1, 0, 128);
+ cp = strchr(target, '/'); /* Yes... const to non is ok. */
+ if (cp) {
+ *cp = '\0';
+ prefix_len = xatoul_range(cp + 1, 0, 128);
} else {
prefix_len = 128;
}