libbpf: Update API functions usage to check error
authorGrant Seltzer <grantseltzer@gmail.com>
Wed, 20 Apr 2022 16:12:25 +0000 (12:12 -0400)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 21 Apr 2022 14:28:25 +0000 (16:28 +0200)
commitdf286716321350d1ca370d5737acf5a10b20ee9e
tree9c434dec59f4683fbdae6672ae3d0cb35d6fb043
parent93442f132b94721c7143ace7f43e51a9025f46fd
libbpf: Update API functions usage to check error

This updates usage of the following API functions within
libbpf so their newly added error return is checked:

- bpf_program__set_expected_attach_type()
- bpf_program__set_type()

Signed-off-by: Grant Seltzer <grantseltzer@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20220420161226.86803-2-grantseltzer@gmail.com
tools/lib/bpf/libbpf.c