Skip to content

Commit

Permalink
net: in the first call to neigh_seq_next, call neigh_get_first, not n…
Browse files Browse the repository at this point in the history
…eigh_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>
  • Loading branch information
Chris Larson authored and David S. Miller committed Aug 3, 2008
1 parent 7e43f11 commit bff6973
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/neighbour.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit bff6973

Please sign in to comment.