misc: fix coverity warnings
Type: fix
Ticket: VPP-1837
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I402b1b06db736b2a7a242ce70ffd409c7c0a4fc2
diff --git a/src/plugins/gtpu/gtpu.c b/src/plugins/gtpu/gtpu.c
index b0d7839..0abac00 100644
--- a/src/plugins/gtpu/gtpu.c
+++ b/src/plugins/gtpu/gtpu.c
@@ -341,7 +341,7 @@
{
ASSERT (ip46_address_is_multicast (ip));
uword *p = hash_get_mem (gtpu_main.mcast_shared, ip);
- ASSERT (p);
+ ALWAYS_ASSERT (p);
return (mcast_shared_t)
{
.as_u64 = *p};
diff --git a/src/plugins/igmp/igmp_proxy.c b/src/plugins/igmp/igmp_proxy.c
index c2f3e06..dc2b4c1 100644
--- a/src/plugins/igmp/igmp_proxy.c
+++ b/src/plugins/igmp/igmp_proxy.c
@@ -326,7 +326,7 @@
igmp_src_t *src;
proxy_config = igmp_config_lookup (proxy_device->upstream_if);
- ASSERT (proxy_config);
+ ALWAYS_ASSERT (proxy_config);
proxy_group = igmp_group_lookup (proxy_config, group->key);
if (!proxy_group)
diff --git a/src/vnet/bonding/cli.c b/src/vnet/bonding/cli.c
index e6d8f1c..66aaa2e 100644
--- a/src/vnet/bonding/cli.c
+++ b/src/vnet/bonding/cli.c
@@ -78,8 +78,8 @@
slave_if_t *sif2 = bond_get_slave_by_sw_if_index (*s2);
bond_if_t *bif;
- ASSERT (sif1);
- ASSERT (sif2);
+ ALWAYS_ASSERT (sif1);
+ ALWAYS_ASSERT (sif2);
/*
* sort entries according to preference rules:
* 1. biggest weight
diff --git a/src/vnet/bonding/node.c b/src/vnet/bonding/node.c
index 49c1f28..a606d20 100644
--- a/src/vnet/bonding/node.c
+++ b/src/vnet/bonding/node.c
@@ -152,11 +152,11 @@
*last_slave_sw_if_index = slave_sw_if_index;
sif = bond_get_slave_by_sw_if_index (slave_sw_if_index);
- ASSERT (sif);
+ ALWAYS_ASSERT (sif);
bif = bond_get_master_by_dev_instance (sif->bif_dev_instance);
- ASSERT (bif);
+ ALWAYS_ASSERT (bif);
ASSERT (vec_len (bif->slaves));
if (PREDICT_FALSE (bif->admin_up == 0))
diff --git a/src/vnet/geneve/geneve.c b/src/vnet/geneve/geneve.c
index a54a538..501ab7f 100644
--- a/src/vnet/geneve/geneve.c
+++ b/src/vnet/geneve/geneve.c
@@ -335,7 +335,7 @@
{
ASSERT (ip46_address_is_multicast (ip));
uword *p = hash_get_mem (geneve_main.mcast_shared, ip);
- ASSERT (p);
+ ALWAYS_ASSERT (p);
return (mcast_shared_t)
{
.as_u64 = *p};
diff --git a/src/vnet/l2/l2_api.c b/src/vnet/l2/l2_api.c
index fa85274..e73d420 100644
--- a/src/vnet/l2/l2_api.c
+++ b/src/vnet/l2/l2_api.c
@@ -1102,7 +1102,7 @@
({
vl_api_registration_t *vl_reg;
vl_reg = vl_api_client_index_to_registration (reg->client_index);
- ASSERT (vl_reg != NULL);
+ ALWAYS_ASSERT (vl_reg != NULL);
if (reg && vl_api_can_send_msg (vl_reg))
{
diff --git a/src/vnet/lisp-gpe/lisp_gpe_adjacency.c b/src/vnet/lisp-gpe/lisp_gpe_adjacency.c
index d9c22a4..ffd21a8 100644
--- a/src/vnet/lisp-gpe/lisp_gpe_adjacency.c
+++ b/src/vnet/lisp-gpe/lisp_gpe_adjacency.c
@@ -264,7 +264,7 @@
key.tunnel_index = ladj->tunnel_index;
uword *p = hash_get_mem (lgm->lisp_stats_index_by_key, &key);
- ASSERT (p);
+ ALWAYS_ASSERT (p);
/* compute payload length starting after GPE */
u32 bytes = b->current_length - (lisp_data - b->data - b->current_data);
diff --git a/src/vnet/srmpls/sr_mpls_policy.c b/src/vnet/srmpls/sr_mpls_policy.c
index 4fb80e1..ceff11c 100755
--- a/src/vnet/srmpls/sr_mpls_policy.c
+++ b/src/vnet/srmpls/sr_mpls_policy.c
@@ -700,7 +700,7 @@
/* CID 180995 This should never be NULL unless the two hash tables
* get out of sync */
- ASSERT (old_value != NULL);
+ ALWAYS_ASSERT (old_value != NULL);
fib_prefix_t pfx = { 0 };
pfx.fp_proto = FIB_PROTOCOL_MPLS;
diff --git a/src/vnet/vxlan-gbp/vxlan_gbp.c b/src/vnet/vxlan-gbp/vxlan_gbp.c
index 9a8158e..d17a2c8 100644
--- a/src/vnet/vxlan-gbp/vxlan_gbp.c
+++ b/src/vnet/vxlan-gbp/vxlan_gbp.c
@@ -317,7 +317,7 @@
{
ASSERT (ip46_address_is_multicast (ip));
uword *p = hash_get_mem (vxlan_gbp_main.mcast_shared, ip);
- ASSERT (p);
+ ALWAYS_ASSERT (p);
mcast_shared_t ret = {.as_u64 = *p };
return ret;
}
diff --git a/src/vnet/vxlan-gpe/vxlan_gpe.c b/src/vnet/vxlan-gpe/vxlan_gpe.c
index e5ff4f7..07b7ac9 100644
--- a/src/vnet/vxlan-gpe/vxlan_gpe.c
+++ b/src/vnet/vxlan-gpe/vxlan_gpe.c
@@ -428,7 +428,7 @@
{
ASSERT (ip46_address_is_multicast (ip));
uword *p = hash_get_mem (vxlan_gpe_main.mcast_shared, ip);
- ASSERT (p);
+ ALWAYS_ASSERT (p);
return (mcast_shared_t)
{
.as_u64 = *p};