Commit 6b93bce5 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Use FOR_ALL_NETS in check_networks.

parent 31cf68b0
...@@ -293,10 +293,10 @@ network_up(struct network *net, int up) ...@@ -293,10 +293,10 @@ network_up(struct network *net, int up)
void void
check_networks(void) check_networks(void)
{ {
int i, rc, ifindex, ifindex_changed = 0; struct network *net;
int rc, ifindex, ifindex_changed = 0;
for(i = 0; i < numnets; i++) { FOR_ALL_NETS(net) {
struct network *net = &nets[i];
ifindex = if_nametoindex(net->ifname); ifindex = if_nametoindex(net->ifname);
if(ifindex != net->ifindex) { if(ifindex != net->ifindex) {
debugf("Noticed ifindex change for %s.\n", net->ifname); debugf("Noticed ifindex change for %s.\n", net->ifname);
......
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