Commit 39f880d
libbpf: optimize the redundant code in the bpf_object__init_user_btf_maps() function.
In the elf_sec_data() function, the input parameter 'scn' will be
evaluated. If it is NULL, then it will directly return NULL. Therefore,
the return value of the elf_sec_data() function already takes into
account the case where the input parameter scn is NULL. Therefore,
subsequently, the code only needs to check whether the return value of
the elf_sec_data() function is NULL.
Signed-off-by: Jianyun Gao <[email protected]>1 parent 7ba9a34 commit 39f880d
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2996 | 2996 | | |
2997 | 2997 | | |
2998 | 2998 | | |
2999 | | - | |
| 2999 | + | |
3000 | 3000 | | |
3001 | 3001 | | |
3002 | 3002 | | |
| |||
0 commit comments