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

[IPV6] NDISC: Sparse: Use different variable name for local use.

Fix the following sparse warnings:
| net/ipv6/ndisc.c:1300:21: warning: symbol 'opt' shadows an earlier one
| net/ipv6/ndisc.c:1078:7: originally declared here

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

authored by

YOSHIFUJI Hideaki and committed by
David S. Miller
61cf46ad 5d5619b4

+5 -5
+5 -5
net/ipv6/ndisc.c
··· 1297 1297 } 1298 1298 1299 1299 if (ndopts.nd_useropts) { 1300 - struct nd_opt_hdr *opt; 1301 - for (opt = ndopts.nd_useropts; 1302 - opt; 1303 - opt = ndisc_next_useropt(opt, ndopts.nd_useropts_end)) { 1304 - ndisc_ra_useropt(skb, opt); 1300 + struct nd_opt_hdr *p; 1301 + for (p = ndopts.nd_useropts; 1302 + p; 1303 + p = ndisc_next_useropt(p, ndopts.nd_useropts_end)) { 1304 + ndisc_ra_useropt(skb, p); 1305 1305 } 1306 1306 } 1307 1307