From: Donald Sharp Date: Tue, 2 Aug 2022 19:34:43 +0000 (-0400) Subject: qpb: Tell coverity the actual size we are copying X-Git-Tag: base_8.4~172^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=529766f153963389eaee8de660d9fdfe1c88de19;p=matthieu%2Ffrr.git qpb: Tell coverity the actual size we are copying `struct prefix` is a superset of `struct prefix_ipv4` and `struct prefix_ipv6`. Let's let coverity figure it out Signed-off-by: Donald Sharp --- diff --git a/qpb/qpb.h b/qpb/qpb.h index 9aeb7d01d4..45690fb4ac 100644 --- a/qpb/qpb.h +++ b/qpb/qpb.h @@ -121,11 +121,13 @@ static inline int qpb__l3_prefix__get(const Qpb__L3Prefix *pb_prefix, switch (family) { case AF_INET: - memset(prefix, 0, sizeof(struct prefix_ipv4)); + memset((struct prefix_ipv4 *)prefix, 0, + sizeof(struct prefix_ipv4)); break; case AF_INET6: - memset(prefix, 0, sizeof(struct prefix_ipv6)); + memset((struct prefix_ipv6 *)prefix, 0, + sizeof(struct prefix_ipv6)); break; default: