Merge pull request #11722 from donaldsharp/qdb

qpb: Tell coverity the actual size we are copying
This commit is contained in:
Donatas Abraitis 2022-08-03 13:24:10 +03:00 committed by GitHub
commit 1aee0a44ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: