summaryrefslogtreecommitdiff
path: root/lib/prefix.c
diff options
context:
space:
mode:
authorMichael Lambert <lambert@psc.edu>2010-07-22 13:20:55 -0400
committerGreg Troxel <gdt@ir.bbn.com>2010-10-06 12:33:05 -0400
commit4c9641ba4df276080c670e03f65b1d442660a50f (patch)
tree15085df8068d8a3864224937eaa407c0484ff57f /lib/prefix.c
parent11d3fe9b9a327b3218a76b2b9001ace50c08de8c (diff)
bgpd, lib: adopt afi_t and safi_t in several places
* bgpd/bgp_attr.c, bgpd/bgp_open.h, bgpd/bgp_route.c, lib/prefix.c, lib/prefix.h: Various integer types were being used where, if we had strict type checking, afi_t and safi_t would be required. Signed-off-by: G.Balaji <balajig81@gmail.com> (cherry picked from commit c8af35ffa2dc79ff7d7ff00b1b61f1f50a100ab6)
Diffstat (limited to 'lib/prefix.c')
-rw-r--r--lib/prefix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/prefix.c b/lib/prefix.c
index c85e6594..7dc866d1 100644
--- a/lib/prefix.c
+++ b/lib/prefix.c
@@ -41,7 +41,7 @@ static const u_char maskbit[] = {0x00, 0x80, 0xc0, 0xe0, 0xf0,
/* Address Famiy Identifier to Address Family converter. */
int
-afi2family (int afi)
+afi2family (afi_t afi)
{
if (afi == AFI_IP)
return AF_INET;
@@ -52,7 +52,7 @@ afi2family (int afi)
return 0;
}
-int
+afi_t
family2afi (int family)
{
if (family == AF_INET)