diff options
| author | Brian Vazquez <[email protected]> | 2020-01-16 04:59:18 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2020-01-16 14:31:52 +0000 |
| commit | 858e284f0ec18bff2620d9a6afe764dc683f8ba1 (patch) | |
| tree | 9c1d6041039aa75e86bbb74638aa007f51cb9f07 /tools/lib/bpf/bpf.c | |
| parent | selftests/bpf: Add whitelist/blacklist of test names to test_progs (diff) | |
| download | kernel-858e284f0ec18bff2620d9a6afe764dc683f8ba1.tar.gz kernel-858e284f0ec18bff2620d9a6afe764dc683f8ba1.zip | |
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 <[email protected]>
Signed-off-by: Brian Vazquez <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/bpf.c')
| -rw-r--r-- | tools/lib/bpf/bpf.c | 2 |
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)) |
