]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: simplify two pieces of logic
authorAndrii Nakryiko <andriin@fb.com>
Wed, 29 May 2019 17:36:09 +0000 (10:36 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 29 May 2019 23:23:35 +0000 (01:23 +0200)
commit552dd40e21bcb82bacde0c7a004fd7ff5dc98a00
tree2998afeb82d3adf13d880b6e1b9917cafcc9c9f0
parentf489a48ed597e1eaea904a63f1809fcf4e4199b8
libbpf: simplify two pieces of logic

Extra check for type is unnecessary in first case.

Extra zeroing is unnecessary, as snprintf guarantees that it will
zero-terminate string.

Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/lib/bpf/libbpf.c