Thread (10 messages) 10 messages, 2 authors, 2020-06-26

Re: [PATCH 2/3] samples: bpf: cleanup pointer error check with libbpf

From: Andrii Nakryiko <hidden>
Date: 2020-06-26 20:25:07
Also in: bpf

On Fri, Jun 26, 2020 at 1:18 AM Daniel T. Lee [off-list ref] wrote:
Libbpf has its own helper function to check for errors in the bpf
data structure (pointer). And Some codes do not use this libbbpf
helper function and check the pointer's error directly.

This commit clean up the existing pointer error check logic with
libbpf.

Signed-off-by: Daniel T. Lee <redacted>
---
This entire patch is wrong. bpf_object__find_program_by_name() returns
NULL if the program is not found, not an error code.
 samples/bpf/sampleip_user.c    | 2 +-
 samples/bpf/trace_event_user.c | 2 +-
 samples/bpf/tracex1_user.c     | 2 +-
 samples/bpf/tracex5_user.c     | 2 +-
 samples/bpf/tracex7_user.c     | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
[...]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help