From fe21ce5540e6ca02755f18493672dbaab4ec30f7 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 7 May 2014 17:54:24 +0100 Subject: [PATCH] netlink: fix const-correctness of ip_fast_csum fallback 211cd627 corrected the constness of ip_csum and ip_fast_csum. But the latter has two implementations, and we missed the C fallback. This resulted in the following compile error on non-i386 platforms: netlink.c:606:2: error: passing argument 1 of `ip_fast_csum' discards `const' qualifier from pointer target type [-Werror] Signed-off-by: Ian Jackson CC: Stephen Early --- netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlink.c b/netlink.c index 50a920f..ea1221d 100644 --- a/netlink.c +++ b/netlink.c @@ -180,7 +180,7 @@ static inline uint16_t ip_fast_csum(const uint8_t *iph, int32_t ihl) { return sum; } #else -static inline uint16_t ip_fast_csum(uint8_t *iph, int32_t ihl) +static inline uint16_t ip_fast_csum(const uint8_t *iph, int32_t ihl) { assert(ihl < INT_MAX/4); return ip_csum(iph,ihl*4); -- 2.11.0