From 05bcac416bcddaf05bd0437bd27a19933502baf2 Mon Sep 17 00:00:00 2001 From: "Enrico Loparco (eloparco)" Date: Fri, 18 Jun 2021 14:32:44 +0200 Subject: [HICN-709] Fix bugs in listener and connection tables and add unit tests Signed-off-by: Enrico Loparco (eloparco) Change-Id: Idf86a3c6a1dd50d29c1a245a00352a553a5fdb42 --- hicn-light/src/hicn/core/pit.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hicn-light/src/hicn/core/pit.h') diff --git a/hicn-light/src/hicn/core/pit.h b/hicn-light/src/hicn/core/pit.h index 85958f88e..9164aab60 100644 --- a/hicn-light/src/hicn/core/pit.h +++ b/hicn-light/src/hicn/core/pit.h @@ -64,9 +64,9 @@ typedef enum { nexthops_add(pit_entry_get_egress(E), (NH)) #define name_hash(name) (name_HashCode(name)) -#define name_hash_eq(a, b) (name_hash(b) - name_hash(a)) +#define name_hash_eq(a, b) (name_hash(b) == name_hash(a)) -KHASH_INIT(pit_name, const Name *, unsigned, 0, name_hash, name_hash_eq); +KHASH_INIT(pit_name, const Name *, unsigned, 1, name_hash, name_hash_eq); typedef struct { size_t max_size; -- cgit 1.2.3-korg