[PATCH 05/12] Uniform coding style: no {} for single statement

Antonio Borneo borneo.antonio at gmail.com
Sun Mar 10 07:06:09 EDT 2013


Signed-off-by: Antonio Borneo <borneo.antonio at gmail.com>
---
 cstp.c    |    3 +--
 main.c    |    3 +--
 openssl.c |    3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/cstp.c b/cstp.c
index dbe1947..bb79e7e 100644
--- a/cstp.c
+++ b/cstp.c
@@ -610,9 +610,8 @@ static int inflate_and_queue_packet(struct openconnect_info *vpninfo,
 	pkt_sum = buf[len - 1] | (buf[len - 2] << 8) |
 		(buf[len - 3] << 16) | (buf[len - 4] << 24);
 
-	if (vpninfo->inflate_adler32 != pkt_sum) {
+	if (vpninfo->inflate_adler32 != pkt_sum)
 		vpninfo->quit_reason = "Compression (inflate) adler32 failure";
-	}
 
 	vpn_progress(vpninfo, PRG_TRACE,
 		     _("Received compressed data packet of %ld bytes\n"),
diff --git a/main.c b/main.c
index 1cbcb82..dfb7d3b 100644
--- a/main.c
+++ b/main.c
@@ -541,9 +541,8 @@ int main(int argc, char **argv)
 		case OPT_COOKIE_ON_STDIN:
 			read_stdin(&vpninfo->cookie);
 			/* If the cookie is empty, ignore it */
-			if (!*vpninfo->cookie) {
+			if (!*vpninfo->cookie)
 				vpninfo->cookie = NULL;
-			}
 			break;
 		case OPT_PASSWORD_ON_STDIN:
 			read_stdin(&vpninfo->password);
diff --git a/openssl.c b/openssl.c
index 36897f2..741f551 100644
--- a/openssl.c
+++ b/openssl.c
@@ -1241,9 +1241,8 @@ static int check_certificate_expiry(struct openconnect_info *vpninfo)
 	} else {
 		t += vpninfo->cert_expire_warning;
 		i = X509_cmp_time(notAfter, &t);
-		if (i < 0) {
+		if (i < 0)
 			reason = _("Client certificate expires soon at");
-		}
 	}
 	if (reason) {
 		BIO *bp = BIO_new(BIO_s_mem());
-- 
1.7.3.4




More information about the openconnect-devel mailing list