diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-11-12 01:54:54 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-11-12 01:54:54 +0000 |
commit | dd91ab3f35500a0a13a7dced870ea5c6f9ad3765 (patch) | |
tree | 2f38b418f4df4610fc87f117e7e8be9996710da0 /apps/netutils/uiplib | |
parent | 96e153c0d29b1ab3657948e280faa25e864b28c5 (diff) | |
download | nuttx-dd91ab3f35500a0a13a7dced870ea5c6f9ad3765.tar.gz nuttx-dd91ab3f35500a0a13a7dced870ea5c6f9ad3765.tar.bz2 nuttx-dd91ab3f35500a0a13a7dced870ea5c6f9ad3765.zip |
A few more build fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5340 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/netutils/uiplib')
-rw-r--r-- | apps/netutils/uiplib/uiplib.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/netutils/uiplib/uiplib.c b/apps/netutils/uiplib/uiplib.c index 32ffaeb06..50182efe1 100644 --- a/apps/netutils/uiplib/uiplib.c +++ b/apps/netutils/uiplib/uiplib.c @@ -45,6 +45,7 @@ #include <stdint.h> #include <stdbool.h> +#include <string.h> #include <debug.h> #include <nuttx/net/uip/uip.h> @@ -103,7 +104,7 @@ bool uiplib_hwmacconv(const char *hwstr, uint8_t *hw) unsigned char i; unsigned char j; - if (strlen(hwstr)!=17) + if (strlen(hwstr) != 17) { return false; } @@ -121,6 +122,7 @@ bool uiplib_hwmacconv(const char *hwstr, uint8_t *hw) { return false; } + if (c == ':' || c == 0) { *hw = tmp; @@ -144,6 +146,7 @@ bool uiplib_hwmacconv(const char *hwstr, uint8_t *hw) { return false; } + ++hwstr; } while(c != ':' && c != 0); |