forked from Minki/linux
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: 2ab3d86ea1
("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
This commit is contained in:
parent
b65053cd94
commit
858e284f0e
@ -457,7 +457,7 @@ static int bpf_map_batch_common(int cmd, int fd, void *in_batch,
|
|||||||
__u32 *count,
|
__u32 *count,
|
||||||
const struct bpf_map_batch_opts *opts)
|
const struct bpf_map_batch_opts *opts)
|
||||||
{
|
{
|
||||||
union bpf_attr attr = {};
|
union bpf_attr attr;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!OPTS_VALID(opts, bpf_map_batch_opts))
|
if (!OPTS_VALID(opts, bpf_map_batch_opts))
|
||||||
|
Loading…
Reference in New Issue
Block a user