diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-04-12 12:53:19 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-04-12 12:53:19 -0600 |
commit | 5fbbc21f13770cc35c3e61e3109c125d03f172eb (patch) | |
tree | 1c1278108c7fe21ea7534a274a6994ae4ed2b6cc /apps/netutils | |
parent | 387c4ace106479e457033b1717051ec55b8d673e (diff) | |
download | nuttx-5fbbc21f13770cc35c3e61e3109c125d03f172eb.tar.gz nuttx-5fbbc21f13770cc35c3e61e3109c125d03f172eb.tar.bz2 nuttx-5fbbc21f13770cc35c3e61e3109c125d03f172eb.zip |
Make sure that there is one space between if and condition
Diffstat (limited to 'apps/netutils')
-rw-r--r-- | apps/netutils/uiplib/uiplib.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/netutils/uiplib/uiplib.c b/apps/netutils/uiplib/uiplib.c index 50182efe1..8106789c7 100644 --- a/apps/netutils/uiplib/uiplib.c +++ b/apps/netutils/uiplib/uiplib.c @@ -82,7 +82,7 @@ bool uiplib_ipaddrconv(const char *addrstr, uint8_t *ipaddr) ++ipaddr; tmp = 0; } - else if(c >= '0' && c <= '9') + else if (c >= '0' && c <= '9') { tmp = (tmp * 10) + (c - '0'); } @@ -130,15 +130,15 @@ bool uiplib_hwmacconv(const char *hwstr, uint8_t *hw) ++hw; tmp = 0; } - else if(c >= '0' && c <= '9') + else if (c >= '0' && c <= '9') { tmp = (tmp << 4) + (c - '0'); } - else if(c >= 'a' && c <= 'f') + else if (c >= 'a' && c <= 'f') { tmp = (tmp << 4) + (c - 'a' + 10); } - else if(c >= 'A' && c <= 'F') + else if (c >= 'A' && c <= 'F') { tmp = (tmp << 4) + (c - 'A' + 10); } @@ -151,5 +151,6 @@ bool uiplib_hwmacconv(const char *hwstr, uint8_t *hw) } while(c != ':' && c != 0); } + return true; } |