diff options
Diffstat (limited to 'lib/routemap.c')
-rw-r--r-- | lib/routemap.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/routemap.c b/lib/routemap.c index 3a20ed5cd..1814bfc1b 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -631,7 +631,7 @@ static unsigned int route_map_hash_key_make(void *p) return string_hash_make(map->name); } -static int route_map_hash_cmp(const void *p1, const void *p2) +static bool route_map_hash_cmp(const void *p1, const void *p2) { const struct route_map *map1 = p1; const struct route_map *map2 = p2; @@ -639,14 +639,14 @@ static int route_map_hash_cmp(const void *p1, const void *p2) if (map1->deleted == map2->deleted) { if (map1->name && map2->name) { if (!strcmp(map1->name, map2->name)) { - return 1; + return true; } } else if (!map1->name && !map2->name) { - return 1; + return true; } } - return 0; + return false; } enum route_map_upd8_type { @@ -676,7 +676,6 @@ struct route_map_dep { struct hash *route_map_dep_hash[ROUTE_MAP_DEP_MAX]; static unsigned int route_map_dep_hash_make_key(void *p); -static int route_map_dep_hash_cmp(const void *p1, const void *p2); static void route_map_clear_all_references(char *rmap_name); static void route_map_rule_delete(struct route_map_rule_list *, struct route_map_rule *); @@ -1624,12 +1623,12 @@ void route_map_event_hook(void (*func)(route_map_event_t, const char *)) } /* Routines for route map dependency lists and dependency processing */ -static int route_map_rmap_hash_cmp(const void *p1, const void *p2) +static bool route_map_rmap_hash_cmp(const void *p1, const void *p2) { return (strcmp((const char *)p1, (const char *)p2) == 0); } -static int route_map_dep_hash_cmp(const void *p1, const void *p2) +static bool route_map_dep_hash_cmp(const void *p1, const void *p2) { return (strcmp(((const struct route_map_dep *)p1)->dep_name, |