[PATCH 04/12] Uniform coding style: conditional statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Put single conditional statement in next line, not
with "if" or "else".

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

diff --git a/cstp.c b/cstp.c
index ad99657..dbe1947 100644
--- a/cstp.c
+++ b/cstp.c
@@ -119,7 +119,8 @@ static void calculate_mtu(struct openconnect_info *vpninfo, int *base_mtu, int *
 			vpn_progress(vpninfo, PRG_TRACE,
 				     _("TCP_INFO rcv mss %d, snd mss %d, adv mss %d, pmtu %d\n"),
 				     ti.tcpi_rcv_mss, ti.tcpi_snd_mss, ti.tcpi_advmss, ti.tcpi_pmtu);
-			if (!*base_mtu) *base_mtu = ti.tcpi_pmtu;
+			if (!*base_mtu)
+				*base_mtu = ti.tcpi_pmtu;
 			if (!*mtu) {
 				if (ti.tcpi_rcv_mss < ti.tcpi_snd_mss)
 					*mtu = ti.tcpi_rcv_mss - 13;
diff --git a/dtls.c b/dtls.c
index 45992b1..9a7de4c 100644
--- a/dtls.c
+++ b/dtls.c
@@ -59,7 +59,8 @@ unsigned char unhex(const char *data)
 time_t time(time_t *t)
 {
 	time_t x = 0x3ab2d948;
-	if (t) *t = x;
+	if (t)
+		*t = x;
 	return x;
 }
 
@@ -891,4 +892,3 @@ int setup_dtls(struct openconnect_info *vpninfo)
 	return -EINVAL;
 }
 #endif
-
diff --git a/tun.c b/tun.c
index 7f711a5..8f5f1b9 100644
--- a/tun.c
+++ b/tun.c
@@ -306,7 +306,8 @@ static void set_script_env(struct openconnect_info *vpninfo)
 
 	if (vpninfo->vpn_domain)
 		setenv("CISCO_DEF_DOMAIN", vpninfo->vpn_domain, 1);
-	else unsetenv ("CISCO_DEF_DOMAIN");
+	else
+		unsetenv("CISCO_DEF_DOMAIN");
 
 	if (vpninfo->vpn_proxy_pac)
 		setenv("CISCO_PROXY_PAC", vpninfo->vpn_proxy_pac, 1);
-- 
1.7.3.4




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux