Thread (25 messages) 25 messages, 3 authors, 2016-09-19
STALE3544d

[PATCH 16/22] net/pcap: remove unnecessary check

From: Ferruh Yigit <hidden>
Date: 2016-08-26 11:23:49
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

Both fields are fields of same type of struct, one's size can't be bigger
than others.

Signed-off-by: Ferruh Yigit <redacted>
---
 drivers/net/pcap/rte_eth_pcap.c | 4 ----
 1 file changed, 4 deletions(-)
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 8b312a9..0dd2dc5 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -814,10 +814,6 @@ rte_pmd_init_internals(const char *name, const unsigned nb_rx_queues,
 	if (*eth_dev == NULL)
 		goto error;
 
-	/* check length of device name */
-	if ((strlen((*eth_dev)->data->name) + 1) > sizeof(data->name))
-		goto error;
-
 	/* now put it all together
 	 * - store queue data in internals,
 	 * - store numa_node info in eth_dev
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help