[dpdk-dev] [PATCH 1/2] net/netvsc: fix lgtm static checker complaint

Stephen Hemminger stephen at networkplumber.org
Wed Mar 27 22:08:42 CET 2019


Since previous test is for mtu < 1519 the next else if
is always true. This causes the lgtm static tool to complain.
Not a real issue, just cosmetic.

Signed-off-by: Stephen Hemminger <sthemmin at microsoft.com>
---
 drivers/net/netvsc/hn_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 6197118b01ee..8818d68cea5c 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -123,7 +123,7 @@ hn_update_packet_stats(struct hn_stats *stats, const struct rte_mbuf *m)
 			stats->size_bins[0]++;
 		else if (s < 1519)
 			stats->size_bins[6]++;
-		else if (s >= 1519)
+		else
 			stats->size_bins[7]++;
 	}
 
-- 
2.17.1



More information about the dev mailing list