libbpf: Remove the duplicate checking of function storage

After the commit eac7d84519 ("tools: libbpf: don't return '.text'
as a program for multi-function programs"), bpf_program__next()
in bpf_object__for_each_program skips the function storage such as .text,
so eliminate the duplicate checking.

Cc: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
Taeung Song 2018-09-03 08:30:07 +09:00 committed by Alexei Starovoitov
parent 428f944bd5
commit 69495d2a52
1 changed files with 1 additions and 1 deletions

View File

@ -2336,7 +2336,7 @@ int bpf_prog_load_xattr(const struct bpf_prog_load_attr *attr,
bpf_program__set_expected_attach_type(prog,
expected_attach_type);
if (!bpf_program__is_function_storage(prog, obj) && !first_prog)
if (!first_prog)
first_prog = prog;
}