Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[IP] UDP: Use SEQ_START_TOKEN.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

YOSHIFUJI Hideaki and committed by
David S. Miller
b50660f1 5e0751f5

+2 -2
+2 -2
net/ipv4/udp.c
··· 1556 1556 __acquires(udp_hash_lock) 1557 1557 { 1558 1558 read_lock(&udp_hash_lock); 1559 - return *pos ? udp_get_idx(seq, *pos-1) : (void *)1; 1559 + return *pos ? udp_get_idx(seq, *pos-1) : SEQ_START_TOKEN; 1560 1560 } 1561 1561 1562 1562 static void *udp_seq_next(struct seq_file *seq, void *v, loff_t *pos) 1563 1563 { 1564 1564 struct sock *sk; 1565 1565 1566 - if (v == (void *)1) 1566 + if (v == SEQ_START_TOKEN) 1567 1567 sk = udp_get_idx(seq, 0); 1568 1568 else 1569 1569 sk = udp_get_next(seq, v);