aboutsummaryrefslogtreecommitdiff
path: root/helper/eth.c
diff options
context:
space:
mode:
Diffstat (limited to 'helper/eth.c')
-rw-r--r--helper/eth.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/helper/eth.c b/helper/eth.c
index 9a151fa23..171563ca8 100644
--- a/helper/eth.c
+++ b/helper/eth.c
@@ -1,7 +1,5 @@
-/* Copyright (c) 2016, Linaro Limited
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2016-2018 Linaro Limited
*/
#include <odp/helper/eth.h>
@@ -11,7 +9,7 @@
int odph_eth_addr_parse(odph_ethaddr_t *mac, const char *str)
{
- int byte[ODPH_ETHADDR_LEN];
+ unsigned int byte[ODPH_ETHADDR_LEN];
int i;
memset(byte, 0, sizeof(byte));
@@ -22,7 +20,7 @@ int odph_eth_addr_parse(odph_ethaddr_t *mac, const char *str)
return -1;
for (i = 0; i < ODPH_ETHADDR_LEN; i++)
- if (byte[i] < 0 || byte[i] > 255)
+ if (byte[i] > 255)
return -1;
mac->addr[0] = byte[0];