aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorChris Larson <clarson@mvista.com>2008-08-03 04:02:41 -0400
committerDavid S. Miller <davem@davemloft.net>2008-08-03 04:02:41 -0400
commitbff69732c9947f821a64a8477f7dcaa9c30e6a69 (patch)
tree58c09d4d29ff15e39c87d9acedf3d8df42a24bb0 /net
parent7e43f1128d4c4bd91786ca6abff45a91e88f9776 (diff)
net: in the first call to neigh_seq_next, call neigh_get_first, not neigh_get_idx.
neigh_seq_next won't be called both with *pos > 0 && v == SEQ_START_TOKEN, so there's no point calling neigh_get_idx when we're on the start token, just call neigh_get_first directly. Signed-off-by: Chris Larson <clarson@mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/neighbour.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index f62c8af85d38..a57de755c8cc 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2385,7 +2385,7 @@ void *neigh_seq_next(struct seq_file *seq, void *v, loff_t *pos)
2385 void *rc; 2385 void *rc;
2386 2386
2387 if (v == SEQ_START_TOKEN) { 2387 if (v == SEQ_START_TOKEN) {
2388 rc = neigh_get_idx(seq, pos); 2388 rc = neigh_get_first(seq);
2389 goto out; 2389 goto out;
2390 } 2390 }
2391 2391