diff cli-runopts.c @ 1215:d058e15ea213

A few minor style fixes
author Matt Johnston <matt@ucc.asn.au>
date Tue, 15 Dec 2015 22:09:55 +0800
parents 7fd1211a1f63
children 980b7ea2c5ef
line wrap: on
line diff
--- 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);
 }