summaryrefslogtreecommitdiffstats
path: root/plugins/ioam-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ioam-plugin')
-rw-r--r--plugins/ioam-plugin/ioam/encap/ip6_ioam_pot.c2
-rw-r--r--plugins/ioam-plugin/ioam/lib-pot/pot_util.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/ioam-plugin/ioam/encap/ip6_ioam_pot.c b/plugins/ioam-plugin/ioam/encap/ip6_ioam_pot.c
index 0a239457559..ec85ea72e5f 100644
--- a/plugins/ioam-plugin/ioam/encap/ip6_ioam_pot.c
+++ b/plugins/ioam-plugin/ioam/encap/ip6_ioam_pot.c
@@ -87,7 +87,7 @@ static u8 * format_ioam_pot (u8 * s, va_list * args)
}
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;
}
diff --git a/plugins/ioam-plugin/ioam/lib-pot/pot_util.c b/plugins/ioam-plugin/ioam/lib-pot/pot_util.c
index 0309cbecf4b..893a89cab33 100644
--- a/plugins/ioam-plugin/ioam/lib-pot/pot_util.c
+++ b/plugins/ioam-plugin/ioam/lib-pot/pot_util.c
@@ -59,7 +59,7 @@ pot_profile *pot_profile_find(u8 id)
{
pot_main_t *sm = &pot_main;
- if (id >= 0 && id < MAX_POT_PROFILES)
+ if (id < MAX_POT_PROFILES)
{
return (&(sm->profile_list[id]));
}
@@ -280,7 +280,7 @@ static clib_error_t *set_pot_profile_command_fn(vlib_main_t * vm,
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;