The structures are already fully initialized, bzero() or memset
is redundant.

Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
---
 drivers/net/tap/tap_bpf_api.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/tap/tap_bpf_api.c b/drivers/net/tap/tap_bpf_api.c
index a6adec855dda..d176da0802eb 100644
--- a/drivers/net/tap/tap_bpf_api.c
+++ b/drivers/net/tap/tap_bpf_api.c
@@ -120,7 +120,6 @@ static int bpf_load(enum bpf_prog_type type,
 {
        union bpf_attr attr = {};
 
-       bzero(&attr, sizeof(attr));
        attr.prog_type = type;
        attr.insn_cnt = (__u32)insns_cnt;
        attr.insns = ptr_to_u64(insns);
@@ -153,7 +152,6 @@ int tap_flow_bpf_rss_map_create(unsigned int key_size,
 {
        union bpf_attr attr = {};
 
-       bzero(&attr, sizeof(attr));
        attr.map_type    = BPF_MAP_TYPE_HASH;
        attr.key_size    = key_size;
        attr.value_size  = value_size;
@@ -181,8 +179,6 @@ int tap_flow_bpf_update_rss_elem(int fd, void *key, void 
*value)
 {
        union bpf_attr attr = {};
 
-       bzero(&attr, sizeof(attr));
-
        attr.map_type = BPF_MAP_TYPE_HASH;
        attr.map_fd = fd;
        attr.key = ptr_to_u64(key);
-- 
2.43.0

Reply via email to