ndp: Use const pointer for ndp_ns packet
We don't modify this structure at all. For some reason cppcheck doesn't catch this with our current options, but did when I was experimenting with some different options. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
0d7b8201ed
commit
d8e05a3fe0
1 changed files with 2 additions and 2 deletions
4
ndp.c
4
ndp.c
|
@ -234,8 +234,8 @@ int ndp(struct ctx *c, const struct icmp6hdr *ih, const struct in6_addr *saddr,
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (ih->icmp6_type == NS) {
|
if (ih->icmp6_type == NS) {
|
||||||
struct ndp_ns *ns = packet_get(p, 0, 0, sizeof(struct ndp_ns),
|
const struct ndp_ns *ns =
|
||||||
NULL);
|
packet_get(p, 0, 0, sizeof(struct ndp_ns), NULL);
|
||||||
|
|
||||||
if (!ns)
|
if (!ns)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue