{
ila_ila2sir_trace_t *tr =
vlib_add_trace (vm, node, p0, sizeof (*tr));
- tr->ila_index = ie0 ? (ie0 - ilm->entries) : ~0;
+ tr->ila_index = ie0 - ilm->entries;
tr->initial_dst = ip60->dst_address;
tr->adj_index = vnet_buffer (p0)->ip.adj_index[VLIB_TX];
}
{
ila_ila2sir_trace_t *tr =
vlib_add_trace (vm, node, p1, sizeof (*tr));
- tr->ila_index = ie1 ? (ie1 - ilm->entries) : ~0;
+ tr->ila_index = ie1 - ilm->entries;
tr->initial_dst = ip61->dst_address;
tr->adj_index = vnet_buffer (p1)->ip.adj_index[VLIB_TX];
}
}
s = format (s, "random = 0x%Lx, Cumulative = 0x%Lx, Index = 0x%x",
- random, cumulative, pot0->reserved_profile_id);
+ random, cumulative, pot0 ? pot0->reserved_profile_id : ~0);
return s;
}
{
pot_main_t *sm = &pot_main;
- if (id >= 0 && id < MAX_POT_PROFILES)
+ if (id < MAX_POT_PROFILES)
{
return (&(sm->profile_list[id]));
}
u64 secret_share;
u64 secret_key;
u8 validator = 0;
- u32 profile_id;
+ u32 profile_id = ~0;
u32 bits;
u64 lpc = 0, poly2 = 0;
pot_profile *profile = NULL;
ip4_address_t ip4_prefix;
ip6_address_t ip6_prefix;
ip4_address_t ip4_src;
- u32 ip6_prefix_len, ip4_prefix_len, sixrd_domain_index;
+ u32 ip6_prefix_len=0, ip4_prefix_len=0, sixrd_domain_index;
u32 num_m_args = 0;
/* Optional arguments */
u32 mtu = 0;