projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b65053c
)
libbpf: Fix unneeded extra initialization in bpf_map_batch_common
author
Brian Vazquez
<brianvv@google.com>
Thu, 16 Jan 2020 04:59:18 +0000
(20:59 -0800)
committer
Daniel Borkmann
<daniel@iogearbox.net>
Thu, 16 Jan 2020 14:31:52 +0000
(15:31 +0100)
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
tools/lib/bpf/bpf.c
patch
|
blob
|
history
diff --git
a/tools/lib/bpf/bpf.c
b/tools/lib/bpf/bpf.c
index
317727d
..
ed42b00
100644
(file)
--- 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))