From ad16e351773f4b606dd8b4dbbe77c2cb35bf5133 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Sun, 28 Mar 2021 04:30:11 +0200 Subject: BMP: Remove superfluous error handling Most error handling code was was for cases that cannot happen, or they would be code bugs (and should use ASSERT()). Keep error handling for just for I/O errors, like in rest of BIRD. --- proto/bmp/map.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'proto/bmp/map.h') diff --git a/proto/bmp/map.h b/proto/bmp/map.h index e9d5798e..0ad5295f 100644 --- a/proto/bmp/map.h +++ b/proto/bmp/map.h @@ -16,8 +16,6 @@ #include "lib/hash.h" #include "lib/resource.h" -#include "proto/bmp/utils.h" - struct bmp_peer_map_key { struct bmp_peer_map_key *next; ip_addr peer_ip; @@ -39,23 +37,23 @@ struct bmp_peer_map { HASH(struct bmp_peer_map_key) peer_hash; // Hash for peers to find the index }; -enum bmp_result +void bmp_peer_map_init(struct bmp_peer_map *map, pool *mpool); struct bmp_peer_map_key bmp_peer_map_key_create(const ip_addr peer_ip, const u32 peer_as); -enum bmp_result +void bmp_peer_map_free(struct bmp_peer_map *map); -enum bmp_result +void bmp_peer_map_flush(struct bmp_peer_map *map); -enum bmp_result +void bmp_peer_map_insert(struct bmp_peer_map *map, const struct bmp_peer_map_key key, const byte *data, const size_t data_size); -enum bmp_result +void bmp_peer_map_remove(struct bmp_peer_map *map, const struct bmp_peer_map_key key); const struct bmp_peer_map_entry * -- cgit v1.2.3