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 | f500373e7954b93de84e92db8d8fd805932885f6 (patch) | |
tree | b1a8bd4ff0243780cb20fd37aad9695de64c0077 /cli-runopts.c | |
parent | 4c51fc26562d3ddc5bf797bbeff353b3da3ce992 (diff) | |
download | dropbear-f500373e7954b93de84e92db8d8fd805932885f6.tar.gz |
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); } |