Commit d4273aa1 authored by Matthieu Boutier's avatar Matthieu Boutier Committed by Juliusz Chroboczek

Style commit.

parent 1f9ae292
...@@ -722,20 +722,16 @@ kernel_routes(struct kernel_route *routes, int maxroutes) ...@@ -722,20 +722,16 @@ kernel_routes(struct kernel_route *routes, int maxroutes)
} }
i = 0; i = 0;
p = buf; for(p = buf; p < buf + len && i < maxroutes; p += rtm->rtm_msglen) {
while(p < buf + len && i < maxroutes) {
rtm = (struct rt_msghdr*)p; rtm = (struct rt_msghdr*)p;
rc = parse_kernel_route(rtm, &routes[i]); rc = parse_kernel_route(rtm, &routes[i]);
if(rc) if(rc < 0)
goto cont; continue;
if(debug > 2) if(debug > 2)
print_kernel_route(1,&routes[i]); print_kernel_route(1,&routes[i]);
i++; i++;
cont:
p += rtm->rtm_msglen;
} }
free(buf); free(buf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment