From: Chris Larson Date: Sun, 3 Aug 2008 08:02:41 +0000 (-0700) Subject: net: in the first call to neigh_seq_next, call neigh_get_first, not neigh_get_idx. X-Git-Tag: v2.6.27-rc2~2^2~19 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=bff69732c9947f821a64a8477f7dcaa9c30e6a69;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: David S. Miller --- diff --git a/net/core/neighbour.c b/net/core/neighbour.c index f62c8af85d3..a57de755c8c 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) void *rc; if (v == SEQ_START_TOKEN) { - rc = neigh_get_idx(seq, pos); + rc = neigh_get_first(seq); goto out; }