summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_table.c
diff options
context:
space:
mode:
authorpaul <paul>2008-07-22 19:56:56 +0000
committerpaul <paul>2008-07-22 19:56:56 +0000
commit42f57d1707f9da733ca2113bf8d9b176bf088ecf (patch)
tree52fe86e9c751cb0765f9b9e30368de9269b431fc /bgpd/bgp_table.c
parent0eaaeb664b7f66e389f1c626befa28d777fe8e65 (diff)
downloadquagga-42f57d1707f9da733ca2113bf8d9b176bf088ecf.tar.bz2
quagga-42f57d1707f9da733ca2113bf8d9b176bf088ecf.tar.xz
[bgpd] fix a couple of trivial compiler warnings
2008-07-22 Paul Jakma <paul.jakma@sun.com> * bgp_community.c: (community_str2com) assigns defaults to local vars * bgp_attr.c: (bgp_attr_parse) match format specifier to arg * bgp_table.{c,h}: (bgp_table_top) can take a * to a const, quelling warning in bgp_route.c
Diffstat (limited to 'bgpd/bgp_table.c')
-rw-r--r--bgpd/bgp_table.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/bgpd/bgp_table.c b/bgpd/bgp_table.c
index be598328..c2120252 100644
--- a/bgpd/bgp_table.c
+++ b/bgpd/bgp_table.c
@@ -230,7 +230,7 @@ bgp_unlock_node (struct bgp_node *node)
/* Find matched prefix. */
struct bgp_node *
-bgp_node_match (struct bgp_table *table, struct prefix *p)
+bgp_node_match (const struct bgp_table *table, struct prefix *p)
{
struct bgp_node *node;
struct bgp_node *matched;
@@ -256,7 +256,7 @@ bgp_node_match (struct bgp_table *table, struct prefix *p)
}
struct bgp_node *
-bgp_node_match_ipv4 (struct bgp_table *table, struct in_addr *addr)
+bgp_node_match_ipv4 (const struct bgp_table *table, struct in_addr *addr)
{
struct prefix_ipv4 p;
@@ -270,7 +270,7 @@ bgp_node_match_ipv4 (struct bgp_table *table, struct in_addr *addr)
#ifdef HAVE_IPV6
struct bgp_node *
-bgp_node_match_ipv6 (struct bgp_table *table, struct in6_addr *addr)
+bgp_node_match_ipv6 (const struct bgp_table *table, struct in6_addr *addr)
{
struct prefix_ipv6 p;
@@ -285,7 +285,7 @@ bgp_node_match_ipv6 (struct bgp_table *table, struct in6_addr *addr)
/* Lookup same prefix node. Return NULL when we can't find route. */
struct bgp_node *
-bgp_node_lookup (struct bgp_table *table, struct prefix *p)
+bgp_node_lookup (const struct bgp_table *table, struct prefix *p)
{
struct bgp_node *node;
@@ -305,7 +305,7 @@ bgp_node_lookup (struct bgp_table *table, struct prefix *p)
/* Add node to routing table. */
struct bgp_node *
-bgp_node_get (struct bgp_table *table, struct prefix *p)
+bgp_node_get (struct bgp_table *const table, struct prefix *p)
{
struct bgp_node *new;
struct bgp_node *node;
@@ -405,7 +405,7 @@ bgp_node_delete (struct bgp_node *node)
/* Get fist node and lock it. This function is useful when one want
to lookup all the node exist in the routing table. */
struct bgp_node *
-bgp_table_top (struct bgp_table *table)
+bgp_table_top (const struct bgp_table *const table)
{
/* If there is no node in the routing table return NULL. */
if (table->top == NULL)
@@ -499,7 +499,7 @@ bgp_route_next_until (struct bgp_node *node, struct bgp_node *limit)
}
unsigned long
-bgp_table_count (struct bgp_table *table)
+bgp_table_count (const struct bgp_table *table)
{
return table->count;
}