o net/core/dev: fix obvious bug in dev_get_idx.

Thanks to Randy Dunlap for spotting this one, now to study report
about /proc/net/dev breakage with many interfaces.
parent f48b1d88
......@@ -1789,7 +1789,7 @@ static __inline__ struct net_device *dev_get_idx(struct seq_file *seq,
struct net_device *dev;
loff_t i;
for (i = 0, dev = dev_base; dev && i < pos; dev = dev->next);
for (i = 0, dev = dev_base; dev && i < pos; ++i, dev = dev->next);
return i == pos ? dev : NULL;
}
......
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