[ovs-dev] [PATCH 2/2] Subject: [PATCH] netdev-linux.c: unreachable code

ua1422 at gmail.com ua1422 at gmail.com
Mon Mar 30 19:15:46 UTC 2020


From: Usman Ansari <ua1422 at gmail.com>

Coverity reports unreachable code in "?" statement
Fixed by removing code segment

Signed-off-by: Usman Ansari <ua1422 at gmail.com>
---
 lib/netdev-linux.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index c6e46f1..8ee047b 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -2634,10 +2634,10 @@ tc_add_matchall_policer(struct netdev *netdev, uint32_t kbits_rate,
         return err;
     }
 
-    index = block_id ? TCM_IFINDEX_MAGIC_BLOCK : ifindex;
+    index = ifindex;
     tcmsg = tc_make_request(index, RTM_NEWTFILTER, NLM_F_CREATE | NLM_F_ECHO,
                             &request);
-    tcmsg->tcm_parent = block_id ? : TC_INGRESS_PARENT;
+    tcmsg->tcm_parent = TC_INGRESS_PARENT;
     tcmsg->tcm_info = tc_make_handle(prio, eth_type);
     tcmsg->tcm_handle = handle;
 
-- 
2.7.4



More information about the dev mailing list