[U-Boot] [PATCHv2 01/21] net: cosmetic: Do not use magic values for ARP_HLEN

Olliver Schinagl oliver at schinagl.nl
Mon Apr 10 15:33:36 UTC 2017


Previously overlooked magic value in commit a40db6d51171 ("net: cosmetic: Do
not use magic values for ARP_HLEN")

Signed-off-by: Olliver Schinagl <oliver at schinagl.nl>
---
 net/eth_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/eth_common.c b/net/eth_common.c
index 58fa295771..049c1ee6f9 100644
--- a/net/eth_common.c
+++ b/net/eth_common.c
@@ -17,7 +17,7 @@ void eth_parse_enetaddr(const char *addr, uchar *enetaddr)
 	char *end;
 	int i;
 
-	for (i = 0; i < 6; ++i) {
+	for (i = 0; i < ARP_HLEN; ++i) {
 		enetaddr[i] = addr ? simple_strtoul(addr, &end, 16) : 0;
 		if (addr)
 			addr = (*end) ? end + 1 : end;
-- 
2.11.0



More information about the U-Boot mailing list