diff --git a/lib/otp/otp_parse.c b/lib/otp/otp_parse.c index b7ca62e9e..0f8bb3e8d 100644 --- a/lib/otp/otp_parse.c +++ b/lib/otp/otp_parse.c @@ -169,11 +169,12 @@ otp_parse_hex (OtpKey key, char *s) b = buf; while (*s) { - if (strchr ("0123456789ABCDEFabcdef", *s)) + if (strchr ("0123456789ABCDEFabcdef", *s)) { if (b - buf >= 16) return -1; else *b++ = tolower(*s); + } s++; } *b = '\0'; diff --git a/lib/roken/getarg.c b/lib/roken/getarg.c index 12ae3bce6..94491dcf4 100644 --- a/lib/roken/getarg.c +++ b/lib/roken/getarg.c @@ -338,11 +338,12 @@ arg_match_long(struct getargs *args, size_t num_args, break; } } - if (current == NULL) + if (current == NULL) { if (partial_match == 1) current = partial; else return ARG_ERR_NO_MATCH; + } if(*optarg == '\0' && !ISFLAG(*current)) return ARG_ERR_NO_MATCH; diff --git a/lib/roken/net_read.c b/lib/roken/net_read.c index fa4545ff2..8de53a26a 100644 --- a/lib/roken/net_read.c +++ b/lib/roken/net_read.c @@ -64,13 +64,14 @@ net_read (int fd, void *buf, size_t nbytes) #else count = read (fd, cbuf, rem); #endif - if (count < 0) + if (count < 0) { if (errno == EINTR) continue; else return count; - else if (count == 0) + } else if (count == 0) { return count; + } cbuf += count; rem -= count; } diff --git a/lib/roken/net_write.c b/lib/roken/net_write.c index e2536c10d..eb9743c7e 100644 --- a/lib/roken/net_write.c +++ b/lib/roken/net_write.c @@ -64,11 +64,12 @@ net_write (int fd, const void *buf, size_t nbytes) #else count = write (fd, cbuf, rem); #endif - if (count < 0) + if (count < 0) { if (errno == EINTR) continue; else return count; + } cbuf += count; rem -= count; } diff --git a/lib/roken/parse_units.c b/lib/roken/parse_units.c index 4eb3e8cf4..d3a821aa6 100644 --- a/lib/roken/parse_units.c +++ b/lib/roken/parse_units.c @@ -88,11 +88,12 @@ parse_something (const char *s, const struct units *units, ++p; val = strtod (p, &next); /* strtol(p, &next, 0); */ - if (val == 0 && p == next) + if (val == 0 && p == next) { if(accept_no_val_p) val = 1; else return -1; + } p = next; while (isspace(*p)) ++p; @@ -126,7 +127,7 @@ parse_something (const char *s, const struct units *units, } } } - if (u->name == NULL) + if (u->name == NULL) { if (partial == 1) { p += u_len; res = (*func)(res, val, partial_unit->mult); @@ -135,6 +136,7 @@ parse_something (const char *s, const struct units *units, } else { return -1; } + } if (*p == 's') ++p; }