diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2021-03-28 15:13:23 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2023-04-16 20:05:17 +0200 |
commit | a995ed43860eb139a13456242aa12486179fac86 (patch) | |
tree | 6fe2dbfa3a86790e1150ac8925c68f7d521f116e /proto/bmp/map.c | |
parent | ad16e351773f4b606dd8b4dbbe77c2cb35bf5133 (diff) |
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().
Diffstat (limited to 'proto/bmp/map.c')
-rw-r--r-- | proto/bmp/map.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |