From e2794c7543caf38027b08a1bfd10eb5dabbfeb83 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Fri, 27 Mar 2026 15:34:14 +1100 Subject: fwd: Comparing rule can be const This pointer stepping through the array of existing rules can be const. For some reason cppcheck doesn't catch this at the moment, but does with certain changes we're looking at for the dynamic configuration client. Signed-off-by: David Gibson Signed-off-by: Stefano Brivio --- fwd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fwd.c b/fwd.c index f3b4bf2..3105819 100644 --- a/fwd.c +++ b/fwd.c @@ -362,7 +362,7 @@ void fwd_rule_add(struct fwd_table *fwd, uint8_t proto, uint8_t flags, /* Check for any conflicting entries */ for (i = 0; i < fwd->count; i++) { char newstr[INANY_ADDRSTRLEN], rulestr[INANY_ADDRSTRLEN]; - struct fwd_rule *rule = &fwd->rules[i]; + const struct fwd_rule *rule = &fwd->rules[i]; if (proto != rule->proto) /* Non-conflicting protocols */ -- cgit v1.2.3