changeset 1215:d058e15ea213

A few minor style fixes
author Matt Johnston <matt@ucc.asn.au>
date Tue, 15 Dec 2015 22:09:55 +0800
parents 61d3f56808a4
children 3daff2072bd0
files cli-main.c cli-runopts.c cli-tcpfwd.c session.h svr-session.c
diffstat 5 files changed, 18 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- 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 */
--- 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);
 }
--- 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);
 }
--- 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 */
--- 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(&timesec);