🔧 build(compile Werror): reduce warning

This commit is contained in:
yangwei
2024-08-07 11:34:52 +08:00
committed by luwenpeng
parent 0c6b441157
commit 526171618f
28 changed files with 41 additions and 24 deletions

View File

@@ -911,7 +911,7 @@ struct packet *ipv4_reassembly_packet(struct ip_reassembly *assy, const struct p
return NULL;
}
struct ip_flow_key key = {0};
struct ip_flow_key key = {};
uint64_t src_addr = hdr->ip_src.s_addr;
uint64_t dst_addr = hdr->ip_dst.s_addr;
key.src_dst_addr[0] = src_addr << 32 | dst_addr;
@@ -1004,7 +1004,7 @@ struct packet *ipv6_reassembly_packet(struct ip_reassembly *assy, const struct p
return NULL;
}
struct ip_flow_key key = {0};
struct ip_flow_key key = {};
memcpy(&key.src_dst_addr[0], hdr->ip6_src.s6_addr, 16);
memcpy(&key.src_dst_addr[2], hdr->ip6_dst.s6_addr, 16);
key.src_dst_len = IPV6_KEYLEN;