};
-int
+int
cmdline_parse_ipaddr(cmdline_parse_token_hdr_t *tk, const char *buf, void *res)
{
struct cmdline_token_ipaddr *tk2 = (struct cmdline_token_ipaddr *)tk;
while (!cmdline_isendoftoken(buf[token_len]))
token_len++;
-
+
/* if token is too big... */
if (token_len >= INET6_ADDRSTRLEN+4)
return -1;
ipaddr->prefixlen = prefixlen;
}
else {
- ipaddr->prefixlen = 0;
+ ipaddr->prefixlen = 0;
}
/* convert the IP addr */
return token_len;
}
return -1;
-
+
}
int cmdline_get_help_ipaddr(cmdline_parse_token_hdr_t *tk, char *dstbuf,