summaryrefslogtreecommitdiffstats
path: root/src/vnet/srv6/sr_policy_rewrite.c
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/vnet/srv6/sr_policy_rewrite.c
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/vnet/srv6/sr_policy_rewrite.c')
-rw-r--r--src/vnet/srv6/sr_policy_rewrite.c4
1 files changed, 0 insertions, 4 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 */