lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <d9e9febab8a9450b9f2a492eec0d176dc2cc7511.1441955761.git.raphael.beamonte@gmail.com>
Date:	Fri, 11 Sep 2015 03:29:23 -0400
From:	Raphaël Beamonte <raphael.beamonte@...il.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	Dan Carpenter <dan.carpenter@...cle.com>,
	Raphaël Beamonte <raphael.beamonte@...il.com>,
	Cristina Opriceana <cristina.opriceana@...il.com>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCHv2 15/16] staging: rtl8192u: r8192U_core: replace else { if() {} } by else if () {}

An else block only contained an if statement. Replace that else
block by an else if block instead.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@...il.com>
---
 drivers/staging/rtl8192u/r8192U_core.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index f81f267..0d169d0 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -4563,15 +4563,13 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv,
 		pstats->SignalStrength =
 			precord_stats->SignalStrength =
 			(u8)(rtl819x_signal_scale_mapping((long)pwdb_all));
-	} else {
+	} else if (rf_rx_num != 0) {
 		/* We can judge RX path number now. */
-		if (rf_rx_num != 0) {
-			long currsig = (total_rssi /= rf_rx_num);
+		long currsig = (total_rssi /= rf_rx_num);
 
-			pstats->SignalStrength =
-				precord_stats->SignalStrength =
-				(u8)(rtl819x_signal_scale_mapping(currsig));
-		}
+		pstats->SignalStrength =
+			precord_stats->SignalStrength =
+			(u8)(rtl819x_signal_scale_mapping(currsig));
 	}
 }	/* QueryRxPhyStatus8190Pci */
 
-- 
2.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ