From a995ed43860eb139a13456242aa12486179fac86 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Sun, 28 Mar 2021 15:13:23 +0200 Subject: BMP: Do not use global instance ptr internally Use local variable to refence relevant instance instead of using global instance ptr. Also, use 'p' variable instead of 'bmp' so we can use common macros like TRACE(). --- proto/bmp/map.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'proto/bmp/map.c') diff --git a/proto/bmp/map.c b/proto/bmp/map.c index f8219dcc..16e714fd 100644 --- a/proto/bmp/map.c +++ b/proto/bmp/map.c @@ -107,13 +107,13 @@ bmp_peer_map_get(struct bmp_peer_map *map, const struct bmp_peer_map_key key) } void -bmp_peer_map_walk(const struct bmp_peer_map *map, bmp_peer_map_walk_action action) +bmp_peer_map_walk(const struct bmp_peer_map *map, bmp_peer_map_walk_action action, void *arg) { struct bmp_peer_map_entry *entry; HASH_WALK_FILTER(map->peer_hash, next, e, _) { entry = (struct bmp_peer_map_entry *) e; - action(entry->key, entry->data.buf, entry->data.buf_size); + action(entry->key, entry->data.buf, entry->data.buf_size, arg); } HASH_WALK_FILTER_END; } -- cgit v1.2.3