radius: optimize "parse" of route

This commit is contained in:
Nikos Mavrogiannopoulos
2014-12-14 20:55:01 +01:00
parent 4cf2797afc
commit 6d331584c1

View File

@@ -127,10 +127,10 @@ static void append_route(struct radius_ctx_st *pctx, const char *route, unsigned
char *p;
/* accept route/mask */
if (strchr(route, '/') == 0)
if ((p=strchr(route, '/')) == 0)
return;
p = strchr(route, ' ');
p = strchr(p, ' ');
if (p != NULL) {
len = p - route;
}