Re: [PATCH v2 bpf-next 03/11] libbpf: streamline ELF parsing error-handling

2019-06-17 Thread Song Liu
> On Jun 17, 2019, at 12:26 PM, Andrii Nakryiko wrote: > > Simplify ELF parsing logic by exiting early, as there is no common clean > up path to execute. That makes it unnecessary to track when err was set > and when it was cleared. It also reduces nesting in some places. > > Signed-off-by: A

[PATCH v2 bpf-next 03/11] libbpf: streamline ELF parsing error-handling

2019-06-17 Thread Andrii Nakryiko
Simplify ELF parsing logic by exiting early, as there is no common clean up path to execute. That makes it unnecessary to track when err was set and when it was cleared. It also reduces nesting in some places. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 44 +++