diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2021-03-18 22:40:27 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-03-19 02:14:22 +0300 |
commit | 3b029e06f624efa90c9a4354e408acf134adb185 (patch) | |
tree | 9ee2fbe956fd8a404d1879f4e43c140abcb99e1b /tools/lib/bpf/btf_dump.c | |
parent | f36e99a45dbe76949eb99bba413c67eda5cd2591 (diff) | |
download | linux-3b029e06f624efa90c9a4354e408acf134adb185.tar.xz |
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
Diffstat (limited to 'tools/lib/bpf/btf_dump.c')
-rw-r--r-- | tools/lib/bpf/btf_dump.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/lib/bpf/btf_dump.c b/tools/lib/bpf/btf_dump.c index 5e957fcceee6..b5dbd5adc0e8 100644 --- a/tools/lib/bpf/btf_dump.c +++ b/tools/lib/bpf/btf_dump.c @@ -166,11 +166,11 @@ static int btf_dump_resize(struct btf_dump *d) if (last_id <= d->last_id) return 0; - if (btf_ensure_mem((void **)&d->type_states, &d->type_states_cap, - sizeof(*d->type_states), last_id + 1)) + if (libbpf_ensure_mem((void **)&d->type_states, &d->type_states_cap, + sizeof(*d->type_states), last_id + 1)) return -ENOMEM; - if (btf_ensure_mem((void **)&d->cached_names, &d->cached_names_cap, - sizeof(*d->cached_names), last_id + 1)) + if (libbpf_ensure_mem((void **)&d->cached_names, &d->cached_names_cap, + sizeof(*d->cached_names), last_id + 1)) return -ENOMEM; if (d->last_id == 0) { |