Commit f9a5e36
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 4d1f3ab commit f9a5e36
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2988 | 2988 | | |
2989 | 2989 | | |
2990 | 2990 | | |
2991 | | - | |
| 2991 | + | |
2992 | 2992 | | |
2993 | 2993 | | |
2994 | 2994 | | |
2995 | 2995 | | |
2996 | 2996 | | |
2997 | 2997 | | |
2998 | | - | |
2999 | | - | |
| 2998 | + | |
| 2999 | + | |
3000 | 3000 | | |
3001 | 3001 | | |
3002 | 3002 | | |
| |||
0 commit comments