Skip to contentSkip to conversation

examples/ethtool: remove redundant assignment

PATCH Applied Min Hu (Connor) 2 participants 2 messages Apr 21, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 examples/ethtool: remove redundant assignment

From: Chengwen Feng <[email protected]>

The new_mtu was assigned twice, the first assignment could be removed.

Fixes bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")
---
 examples/ethtool/ethtool-app/ethapp.c | 1 -
 1 file changed, 1 deletion(-)
examples/ethtool/ethtool-app/ethapp.c +0 -1
index e6c93e1..36a1c37 100644
@@ -528,7 +528,6 @@ pcmd_mtu_callback(void *ptr_params,
 		printf("Error: Invalid port number %i\n", params->port);
 		return;
 	}
-	new_mtu = atoi(params->opt);
 	new_mtu = strtoul(params->opt, &ptr_parse_end, 10);
 	if (*ptr_parse_end != '\0' ||
 			new_mtu < RTE_ETHER_MIN_MTU ||
Signature · 1 line
2.7.4
#1 lore raw

21/04/2021 04:39, Min Hu (Connor):

examples/ethtool/ethtool-app/ethapp.c pcmd_mtu_callback(void *ptr_params, · line 531

Quoted 12 lines

From: Chengwen Feng <[email protected]>

The new_mtu was assigned twice, the first assignment could be removed.

Fixes bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")

---

examples/ethtool/ethtool-app/ethapp.c +0 -1
-	new_mtu = atoi(params->opt);
 	new_mtu = strtoul(params->opt, &ptr_parse_end, 10);

Indeed, it looks useless.

Applied, thanks.