libbpf: refactor bpf_*_get_next_id() functions
authorQuentin Monnet <quentin.monnet@netronome.com>
Tue, 20 Aug 2019 09:31:52 +0000 (10:31 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 20 Aug 2019 16:51:06 +0000 (09:51 -0700)
commita6e130c4203bcc73450a00f647d99bd75ded95cb
tree4c4cd0d9d661d310578123bed3b5169e620a72dd
parentd2648e1ebbceb4da4f2edf5d471963f8831f3554
libbpf: refactor bpf_*_get_next_id() functions

In preparation for the introduction of a similar function for retrieving
the id of the next BTF object, consolidate the code from
bpf_prog_get_next_id() and bpf_map_get_next_id() in libbpf.

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/bpf.c