Commit 858e284f authored by Brian Vazquez's avatar Brian Vazquez Committed by Daniel Borkmann

libbpf: Fix unneeded extra initialization in bpf_map_batch_common

bpf_attr doesn't required to be declared with '= {}' as memset is used
in the code.

Fixes: 2ab3d86e ("libbpf: Add libbpf support to batch ops")
Reported-by: default avatarAndrii Nakryiko <andriin@fb.com>
Signed-off-by: default avatarBrian Vazquez <brianvv@google.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200116045918.75597-1-brianvv@google.com
parent b65053cd
......@@ -457,7 +457,7 @@ static int bpf_map_batch_common(int cmd, int fd, void *in_batch,
__u32 *count,
const struct bpf_map_batch_opts *opts)
{
union bpf_attr attr = {};
union bpf_attr attr;
int ret;
if (!OPTS_VALID(opts, bpf_map_batch_opts))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment