aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2021-10-26 11:35:48 +0200
committerBeno�t Ganne <bganne@cisco.com>2022-01-24 08:53:46 +0000
commit13b3e61c50fef613955e9cf065ae65ab7fad431e (patch)
tree6f243533d5d92f2c18e9a5d25ea6ea87eb614a5e /src
parent08f843e562de923c8521a4d1d388fbb6d33c3fcf (diff)
sr: fix coverity warning
Remove dead code. Pool element cannot be NULL. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I7812efdcdc414af8352474c4e527c878d2e2c459
Diffstat (limited to 'src')
-rw-r--r--src/vnet/srv6/sr_policy_rewrite.c4
-rw-r--r--src/vnet/srv6/sr_steering.c3
2 files changed, 0 insertions, 7 deletions
diff --git a/src/vnet/srv6/sr_policy_rewrite.c b/src/vnet/srv6/sr_policy_rewrite.c
index 500772e8065..fdbf0dd08fa 100644
--- a/src/vnet/srv6/sr_policy_rewrite.c
+++ b/src/vnet/srv6/sr_policy_rewrite.c
@@ -740,8 +740,6 @@ sr_policy_del (ip6_address_t * bsid, u32 index)
else
{
sr_policy = pool_elt_at_index (sm->sr_policies, index);
- if (!sr_policy)
- return -1;
}
/* Remove BindingSID FIB entry */
@@ -850,8 +848,6 @@ sr_policy_mod (ip6_address_t * bsid, u32 index, u32 fib_table,
else
{
sr_policy = pool_elt_at_index (sm->sr_policies, index);
- if (!sr_policy)
- return -1;
}
if (operation == 1) /* Add SR List to an existing SR policy */
diff --git a/src/vnet/srv6/sr_steering.c b/src/vnet/srv6/sr_steering.c
index cb1d81742eb..6e5c5e0e9f0 100644
--- a/src/vnet/srv6/sr_steering.c
+++ b/src/vnet/srv6/sr_steering.c
@@ -184,9 +184,6 @@ sr_steering_policy (int is_del, ip6_address_t * bsid, u32 sr_policy_index,
else
sr_policy = pool_elt_at_index (sm->sr_policies, sr_policy_index);
- if (!sr_policy)
- return -2;
-
steer_pl->sr_policy = sr_policy - sm->sr_policies;
/* Remove old FIB/hw redirection and create a new one */