[PATCH 03/32] app/graph: replace memcpy with structure assignment
Stephen Hemminger
stephen at networkplumber.org
Sat Feb 8 21:21:55 CET 2025
Prefer structure assignment over memcpy.
Found by struct-assign.cocci.
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
app/graph/ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/graph/ethdev.c b/app/graph/ethdev.c
index d343235dae..2f4cf65c96 100644
--- a/app/graph/ethdev.c
+++ b/app/graph/ethdev.c
@@ -422,7 +422,7 @@ ethdev_process(const char *name, struct ethdev_config *params)
}
/* Port */
- memcpy(&port_conf, &port_conf_default, sizeof(struct rte_eth_conf));
+ port_conf = port_conf_default;
if (rss) {
uint64_t rss_hf = RTE_ETH_RSS_IP | RTE_ETH_RSS_TCP | RTE_ETH_RSS_UDP;
--
2.47.2
More information about the dev
mailing list