diff options
author | Paul Jakma <paul.jakma@sun.com> | 2007-04-29 18:25:17 +0000 |
---|---|---|
committer | Paul Jakma <paul.jakma@sun.com> | 2007-04-29 18:25:17 +0000 |
commit | 923de654c8d251d6714a6f9da2e93c236e935042 (patch) | |
tree | 473cc25308810340efb82724101bd428af352958 /bgpd/bgp_advertise.c | |
parent | e8eb8340c14f53194786b766992f61cc0abf7a8e (diff) |
[bgpd] Fix warnings: hash callbacks should match hash API declarations
2007-04-22 Sebastien Tandel <sebastien@tandel.be>
* bgp_advertise.c : (baa_hash_alloc, baa_hash_key, baa_hash_cmp)
conforms to quagga hash API. Defines _hash_[alloc|key|cmp] with
void * arguments as defined by the API.
* bgp_aspath.c,h : (aspath_key_make) conforms to quagga hash API.
Defines _hash_[alloc|key|cmp] with void * arguments as defined by
the API.
* bgp_attr.c,h : (cluster_hash_alloc, cluster_hash_key_make,
cluster_hash_cmp, transit_hash_alloc, transit_hash_key_make,
transit_hash_cmp, attrhash_key_make, attrhash_cmp,
bgp_attr_hash_alloc) conforms to quagga hash API. Defines
_hash_[alloc|key|cmp] with void * arguments as defined by the API.
Diffstat (limited to 'bgpd/bgp_advertise.c')
-rw-r--r-- | bgpd/bgp_advertise.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/bgpd/bgp_advertise.c b/bgpd/bgp_advertise.c index 3a40b1a7..73b868a8 100644 --- a/bgpd/bgp_advertise.c +++ b/bgpd/bgp_advertise.c @@ -53,8 +53,9 @@ baa_free (struct bgp_advertise_attr *baa) } static void * -baa_hash_alloc (struct bgp_advertise_attr *ref) +baa_hash_alloc (void *p) { + struct bgp_advertise_attr * ref = (struct bgp_advertise_attr *) p; struct bgp_advertise_attr *baa; baa = baa_new (); @@ -63,14 +64,19 @@ baa_hash_alloc (struct bgp_advertise_attr *ref) } static unsigned int -baa_hash_key (struct bgp_advertise_attr *baa) +baa_hash_key (void *p) { + struct bgp_advertise_attr * baa = (struct bgp_advertise_attr *) p; + return attrhash_key_make (baa->attr); } static int -baa_hash_cmp (struct bgp_advertise_attr *baa1, struct bgp_advertise_attr *baa2) +baa_hash_cmp (void *p1, void *p2) { + struct bgp_advertise_attr * baa1 = (struct bgp_advertise_attr *) p1; + struct bgp_advertise_attr * baa2 = (struct bgp_advertise_attr *) p2; + return attrhash_cmp (baa1->attr, baa2->attr); } |