From a179ca6707b29cfc01371fb5636b2f49d263ab83 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Mon, 15 Jan 2024 17:39:43 +1100 Subject: treewide: Make a bunch of pointer variables pointers to const Sufficiently recent cppcheck (I'm using 2.13.0) seems to have added another warning for pointer variables which could be pointer to const but aren't. Use this to make a bunch of variables const pointers where they previously weren't for no particular reason. Signed-off-by: David Gibson Signed-off-by: Stefano Brivio --- dhcpv6.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'dhcpv6.c') diff --git a/dhcpv6.c b/dhcpv6.c index 58171bb..7dcca2a 100644 --- a/dhcpv6.c +++ b/dhcpv6.c @@ -426,10 +426,11 @@ search: int dhcpv6(struct ctx *c, const struct pool *p, const struct in6_addr *saddr, const struct in6_addr *daddr) { - struct opt_hdr *ia, *bad_ia, *client_id, *server_id; - struct in6_addr *src; - struct msg_hdr *mh; - struct udphdr *uh; + struct opt_hdr *ia, *bad_ia, *client_id; + const struct opt_hdr *server_id; + const struct in6_addr *src; + const struct msg_hdr *mh; + const struct udphdr *uh; size_t mlen, n; uh = packet_get(p, 0, 0, sizeof(*uh), &mlen); -- cgit v1.2.3