aboutsummaryrefslogtreecommitdiffstats
path: root/nest/rt-table.c
diff options
context:
space:
mode:
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r--nest/rt-table.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index 00476069..c6e48c38 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -1282,8 +1282,8 @@ rte_announce_i(rtable *tab, unsigned type, net *net, rte *new, rte *old,
rte_update_unlock();
}
-void
-rte_discard(rtable *t, rte *old) /* Non-filtered route deletion, used during garbage collection */
+static inline void
+rte_discard(rte *old) /* Non-filtered route deletion, used during garbage collection */
{
rte_update_lock();
rte_recalculate(old->sender, old->net, NULL, old->attrs->src);
@@ -1606,7 +1606,7 @@ again:
return 0;
}
- rte_discard(tab, e);
+ rte_discard(e);
(*limit)--;
goto rescan;
@@ -1712,7 +1712,7 @@ rta_apply_hostentry(rta *a, struct hostentry *he)
}
static inline rte *
-rt_next_hop_update_rte(rtable *tab, rte *old)
+rt_next_hop_update_rte(rtable *tab UNUSED, rte *old)
{
rta a;
memcpy(&a, old->attrs, sizeof(rta));
@@ -2104,11 +2104,11 @@ hc_remove(struct hostcache *hc, struct hostentry *he)
static void
hc_alloc_table(struct hostcache *hc, unsigned order)
{
- unsigned hsize = 1 << order;
+ uint hsize = 1 << order;
hc->hash_order = order;
hc->hash_shift = 16 - order;
- hc->hash_max = (order >= HC_HI_ORDER) ? ~0 : (hsize HC_HI_MARK);
- hc->hash_min = (order <= HC_LO_ORDER) ? 0 : (hsize HC_LO_MARK);
+ hc->hash_max = (order >= HC_HI_ORDER) ? ~0U : (hsize HC_HI_MARK);
+ hc->hash_min = (order <= HC_LO_ORDER) ? 0U : (hsize HC_LO_MARK);
hc->hash_table = mb_allocz(rt_table_pool, hsize * sizeof(struct hostentry *));
}
@@ -2116,10 +2116,10 @@ hc_alloc_table(struct hostcache *hc, unsigned order)
static void
hc_resize(struct hostcache *hc, unsigned new_order)
{
- unsigned old_size = 1 << hc->hash_order;
struct hostentry **old_table = hc->hash_table;
struct hostentry *he, *hen;
- int i;
+ uint old_size = 1 << hc->hash_order;
+ uint i;
hc_alloc_table(hc, new_order);
for (i = 0; i < old_size; i++)