fm10k: use an unsigned int for i in ethtool_get_strings
Subsystems (2)
PATCH 1/1 fm10k: use an unsigned int for i in ethtool_get_strings
The value will never be negative, and we use the %u print format. Thus, use unsigned int for the loop counter. Issue found using cppcheck.
--- drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c +1 -1
@@ -124,7 +124,7 @@ static void fm10k_get_strings(struct net_device *dev, u32 stringset, u8 *data) {struct fm10k_intfc *interface =netdev_priv (dev);char *p = (char *)data; -int i; +unsigned int i;switch (stringset) {case ETH_SS_TEST :
Signature · 1 line
2.4.2
Singh
PATCH 1/1 fm10k: use an unsigned int for i in ethtool_get_strings
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Jacob Keller
Sent: Tuesday, June 16, 2015 1:39 PM
To: Intel Wired LAN <[email protected]>
Subject: [Intel-wired-lan] [PATCH rc2] fm10k: use an unsigned int for i in ethtool_get_strings
The value will never be negative, and we use the %u print format. Thus, use unsigned int for the loop counter. Issue found using cppcheck.
---
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan at lists.osuosl.org
http://lists.osuosl.org/mailman/listinfo/intel-wired-lan