diff options
author | Matt Johnston <matt@ucc.asn.au> | 2015-12-15 22:09:55 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2015-12-15 22:09:55 +0800 |
commit | 79b43270a70143f97ba58c13cc9d055339b44cbe (patch) | |
tree | 0817d629170c6f92e6260a363676bf21ad86e1a5 /cli-runopts.c | |
parent | 3d33e65a3546193e05eb469d7c5a9b2b0931420d (diff) |
A few minor style fixes
Diffstat (limited to 'cli-runopts.c')
-rw-r--r-- | cli-runopts.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/cli-runopts.c b/cli-runopts.c index 3c70332..fad9428 100644 --- a/cli-runopts.c +++ b/cli-runopts.c @@ -828,17 +828,20 @@ static int match_extendedopt(const char** strptr, const char *optname) { int optlen = strlen(optname); const char *str = *strptr; - while (isspace(*str)) + while (isspace(*str)) { ++str; + } - if (strncasecmp(str, optname, optlen) != 0) + if (strncasecmp(str, optname, optlen) != 0) { return DROPBEAR_FAILURE; + } str += optlen; while (isspace(*str) || (!seen_eq && *str == '=')) { - if (*str == '=') + if (*str == '=') { seen_eq = 1; + } ++str; } @@ -846,12 +849,12 @@ static int match_extendedopt(const char** strptr, const char *optname) { return DROPBEAR_SUCCESS; } -static int parse_flag_value(const char *value) -{ - if (strcmp(value, "yes") == 0 || strcmp(value, "true") == 0) +static int parse_flag_value(const char *value) { + if (strcmp(value, "yes") == 0 || strcmp(value, "true") == 0) { return 1; - else if (strcmp(value, "no") == 0 || strcmp(value, "false") == 0) + } else if (strcmp(value, "no") == 0 || strcmp(value, "false") == 0) { return 0; + } dropbear_exit("Bad yes/no argument '%s'", value); } |