summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-12-08 13:14:27 +0300
committerDenis Ovsienko <infrastation@yandex.ru>2009-12-08 13:14:27 +0300
commitd02c56cdf0c2e01a986417ed973dd7a2a5368ac1 (patch)
tree59e92e74fefdddd8fd01b0fff98749922652b061
parent0d6388abc7a5da2a20a4854c400c8e176127e480 (diff)
zebra: fix more compiler warnings
* zebra/zebra_rib.c * nexthop_active_update(): make local int vars unsigned * nexthop_active_check(): return unsigned for consistency * rib_dump(): cast time in printf format * vrf_free(): remove unused function * vrf_lookup_by_name(): idem * rib_if_up(): idem * rib_if_down(): idem
-rw-r--r--zebra/zebra_rib.c44
1 files changed, 4 insertions, 40 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index fb4e7eae..0a59c5fa 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -93,15 +93,6 @@ vrf_alloc (const char *name)
return vrf;
}
-/* Free VRF. */
-static void
-vrf_free (struct vrf *vrf)
-{
- if (vrf->name)
- XFREE (MTYPE_VRF_NAME, vrf->name);
- XFREE (MTYPE_VRF, vrf);
-}
-
/* Lookup VRF by identifier. */
struct vrf *
vrf_lookup (u_int32_t id)
@@ -109,20 +100,6 @@ vrf_lookup (u_int32_t id)
return vector_lookup (vrf_vector, id);
}
-/* Lookup VRF by name. */
-static struct vrf *
-vrf_lookup_by_name (char *name)
-{
- unsigned int i;
- struct vrf *vrf;
-
- for (i = 0; i < vector_active (vrf_vector); i++)
- if ((vrf = vector_slot (vrf_vector, i)) != NULL)
- if (vrf->name && name && strcmp (vrf->name, name) == 0)
- return vrf;
- return NULL;
-}
-
/* Initialize VRF. */
static void
vrf_init (void)
@@ -791,7 +768,7 @@ rib_match_ipv6 (struct in6_addr *addr)
* The return value is the final value of 'ACTIVE' flag.
*/
-static int
+static unsigned
nexthop_active_check (struct route_node *rn, struct rib *rib,
struct nexthop *nexthop, int set)
{
@@ -905,7 +882,7 @@ static int
nexthop_active_update (struct route_node *rn, struct rib *rib, int set)
{
struct nexthop *nexthop;
- int prev_active, prev_index, new_active;
+ unsigned int prev_active, prev_index, new_active;
rib->nexthop_active_num = 0;
UNSET_FLAG (rib->flags, ZEBRA_FLAG_CHANGED);
@@ -1653,10 +1630,10 @@ void rib_dump (const char * func, const struct prefix_ipv4 * p, const struct rib
zlog_debug ("%s: dumping RIB entry %p for %s/%d", func, rib, straddr1, p->prefixlen);
zlog_debug
(
- "%s: refcnt == %lu, uptime == %u, type == %u, table == %d",
+ "%s: refcnt == %lu, uptime == %lu, type == %u, table == %d",
func,
rib->refcnt,
- rib->uptime,
+ (unsigned long) rib->uptime,
rib->type,
rib->table
);
@@ -2860,19 +2837,6 @@ rib_update (void)
rib_queue_add (&zebrad, rn);
}
-/* Interface goes up. */
-static void
-rib_if_up (struct interface *ifp)
-{
- rib_update ();
-}
-
-/* Interface goes down. */
-static void
-rib_if_down (struct interface *ifp)
-{
- rib_update ();
-}
/* Remove all routes which comes from non main table. */
static void