# HG changeset patch # User Matt Johnston # Date 1450188595 -28800 # Node ID d058e15ea2139c921149dcbdc110dad2adb6d600 # Parent 61d3f56808a49f7f33d020326a4b226c04610686 A few minor style fixes diff -r 61d3f56808a4 -r d058e15ea213 cli-main.c --- a/cli-main.c Tue Dec 15 21:55:51 2015 +0800 +++ b/cli-main.c Tue Dec 15 22:09:55 2015 +0800 @@ -164,11 +164,11 @@ } } -static void killchild(int signo) -{ +static void killchild(int signo) { kill_proxy_command(); - if (signo) + if (signo) { _exit(1); + } exit(1); } #endif /* ENABLE_CLI_PROXYCMD */ diff -r 61d3f56808a4 -r d058e15ea213 cli-runopts.c --- a/cli-runopts.c Tue Dec 15 21:55:51 2015 +0800 +++ b/cli-runopts.c Tue Dec 15 22:09:55 2015 +0800 @@ -828,17 +828,20 @@ 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 @@ 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); } diff -r 61d3f56808a4 -r d058e15ea213 cli-tcpfwd.c --- a/cli-tcpfwd.c Tue Dec 15 21:55:51 2015 +0800 +++ b/cli-tcpfwd.c Tue Dec 15 22:09:55 2015 +0800 @@ -67,10 +67,11 @@ va_list param; va_start(param, format); - if (cli_opts.exit_on_fwd_failure) + if (cli_opts.exit_on_fwd_failure) { _dropbear_exit(EXIT_FAILURE, format, param); - else + } else { _dropbear_log(LOG_WARNING, format, param); + } va_end(param); } diff -r 61d3f56808a4 -r d058e15ea213 session.h --- a/session.h Tue Dec 15 21:55:51 2015 +0800 +++ b/session.h Tue Dec 15 22:09:55 2015 +0800 @@ -305,7 +305,7 @@ struct AgentkeyList *agentkeys; /* Keys to use for public-key auth */ #endif - int proxy_cmd_pid; + pid_t proxy_cmd_pid; }; /* Global structs storing the state */ diff -r 61d3f56808a4 -r d058e15ea213 svr-session.c --- a/svr-session.c Tue Dec 15 21:55:51 2015 +0800 +++ b/svr-session.c Tue Dec 15 22:09:55 2015 +0800 @@ -215,8 +215,7 @@ havetrace = debug_trace; #endif - if (!opts.usingsyslog || havetrace) - { + if (!opts.usingsyslog || havetrace) { struct tm * local_tm = NULL; timesec = time(NULL); local_tm = localtime(×ec);