From 685b50c3ce33ccf8441b3ac6f5152389bd772b35 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Thu, 21 Oct 2021 12:06:58 +0200 Subject: Makefile: cppcheck target: Suppress unmatchedSuppression, pass CFLAGS Some of those warnings don't trigger even on systems with very similar toolchains, suppress unmatchedSuppression warnings, they're basically useless. While at it, pass CFLAGS to cppcheck. Signed-off-by: Stefano Brivio --- ndp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ndp.c') diff --git a/ndp.c b/ndp.c index 3a766ec..c04df6a 100644 --- a/ndp.c +++ b/ndp.c @@ -140,7 +140,7 @@ int ndp(struct ctx *c, struct ethhdr *eh, size_t len) for (n = 0; *c->dns_search[n].n; n++) dns_s_len += strlen(c->dns_search[n].n) + 2; - if (len) { + if (dns_s_len) { *p++ = 31; /* DNSSL */ *p++ = (len + 8 - 1) / 8 + 1; /* length */ p += 2; /* reserved */ -- cgit v1.2.3