Skip to content

Commit

Permalink
libbpf: Remove HASHMAP_INIT static initialization helper
Browse files Browse the repository at this point in the history
Remove the wrong HASHMAP_INIT. It's not used anywhere in libbpf.

Signed-off-by: John Sanpe <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
  • Loading branch information
sanpeqf authored and anakryiko committed Jul 11, 2023
1 parent 8a0260d commit a3e7e6b
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions tools/lib/bpf/hashmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,6 @@ struct hashmap {
size_t sz;
};

#define HASHMAP_INIT(hash_fn, equal_fn, ctx) { \
.hash_fn = (hash_fn), \
.equal_fn = (equal_fn), \
.ctx = (ctx), \
.buckets = NULL, \
.cap = 0, \
.cap_bits = 0, \
.sz = 0, \
}

void hashmap__init(struct hashmap *map, hashmap_hash_fn hash_fn,
hashmap_equal_fn equal_fn, void *ctx);
struct hashmap *hashmap__new(hashmap_hash_fn hash_fn,
Expand Down

0 comments on commit a3e7e6b

Please sign in to comment.