From 5fbbc21f13770cc35c3e61e3109c125d03f172eb Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 12 Apr 2014 12:53:19 -0600 Subject: Make sure that there is one space between if and condition --- apps/netutils/uiplib/uiplib.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'apps/netutils') 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; } -- cgit v1.2.3