libbpf: Fix unneeded extra initialization in bpf_map_batch_common
Subsystems (4)
PATCH 1/1 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]>
--- tools/lib/bpf/bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/bpf/bpf.c +1 -1
@@ -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))
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
Quoted 6 lines · Brian Vazquez
bpf_attrdoesn'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]>
Applied, thanks!