libbpf: Rename internal memory-management helpers

Rename btf_add_mem() and btf_ensure_mem() helpers that abstract away details
of dynamically resizable memory to use libbpf_ prefix, as they are not
BTF-specific. No functional changes.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210318194036.3521577-4-andrii@kernel.org
This commit is contained in:
Andrii Nakryiko
2021-03-18 12:40:27 -07:00
committed by Andrii Nakryiko
parent 74e94c40fe
commit 7fc514acf1
4 changed files with 21 additions and 21 deletions

View File

@@ -4868,8 +4868,8 @@ static int load_module_btfs(struct bpf_object *obj)
goto err_out;
}
err = btf_ensure_mem((void **)&obj->btf_modules, &obj->btf_module_cap,
sizeof(*obj->btf_modules), obj->btf_module_cnt + 1);
err = libbpf_ensure_mem((void **)&obj->btf_modules, &obj->btf_module_cap,
sizeof(*obj->btf_modules), obj->btf_module_cnt + 1);
if (err)
goto err_out;