Re: [PATCH bpf-next v3 1/3] tools: bpftool: clean up function to dump map entry

2020-09-10 Thread Andrii Nakryiko
On Thu, Sep 10, 2020 at 9:41 AM Andrii Nakryiko wrote: > > On Thu, Sep 10, 2020 at 3:27 AM Quentin Monnet wrote: > > > > The function used to dump a map entry in bpftool is a bit difficult to > > follow, as a consequence to earlier refactorings. There is a variable > > ("num_elems") which does no

Re: [PATCH bpf-next v3 1/3] tools: bpftool: clean up function to dump map entry

2020-09-10 Thread Andrii Nakryiko
On Thu, Sep 10, 2020 at 3:27 AM Quentin Monnet wrote: > > The function used to dump a map entry in bpftool is a bit difficult to > follow, as a consequence to earlier refactorings. There is a variable > ("num_elems") which does not appear to be necessary, and the error > handling would look cleane

[PATCH bpf-next v3 1/3] tools: bpftool: clean up function to dump map entry

2020-09-10 Thread Quentin Monnet
The function used to dump a map entry in bpftool is a bit difficult to follow, as a consequence to earlier refactorings. There is a variable ("num_elems") which does not appear to be necessary, and the error handling would look cleaner if moved to its own function. Let's clean it up. No functional