summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Vazquez <brianvv@google.com>2020-01-15 20:59:18 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2020-01-16 15:31:52 +0100
commit858e284f0ec18bff2620d9a6afe764dc683f8ba1 (patch)
tree9c1d6041039aa75e86bbb74638aa007f51cb9f07
parentb65053cd94f46619b4aae746b98f2d8d9274540e (diff)
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: 2ab3d86ea1859 ("libbpf: Add libbpf support to batch ops") Reported-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Brian Vazquez <brianvv@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20200116045918.75597-1-brianvv@google.com
-rw-r--r--tools/lib/bpf/bpf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c
index 317727d61214..ed42b006533c 100644
--- a/tools/lib/bpf/bpf.c
+++ b/tools/lib/bpf/bpf.c
@@ -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))