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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1422731121-5560-1-git-send-email-derrick.greenspan@knights.ucf.edu>
Date:	Sat, 31 Jan 2015 14:05:21 -0500
From:	Derrick Greenspan <derrick.greenspan@...ghts.ucf.edu>
To:	Malcolm Priestley <tvboxspy@...il.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Forest Bond <forest@...ttletooquiet.net>,
	<devel@...verdev.osuosl.org>, <linux-kernel@...r.kernel.org>
CC:	Derrick Greenspan <derrick.greenspan@...ghts.ucf.edu>
Subject: [PATCHv3] staging: vt6656: removed erroneous else statement

This patch fixes the checkpatch.pl warning:

WARNING: else is not generally useful after a break or return
559: FILE: drivers/staging/vt6656/rxtx.c:559:
return vnt_rxtx_datahead_g_fb(tx_context, &buf->data_head);
} else {

Signed-off-by: Derrick Greenspan <derrick.greenspan@...ghts.ucf.edu>
---
Changes in v2:
 - Hopefully fixed whitespace!
Changes in v3:
 - Fixed GCC compiler warning
---
 drivers/staging/vt6656/rxtx.c | 33 ++++++++++++++++-----------------
 1 file changed, 16 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index b74f672..cb5d5ca 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -556,25 +556,24 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
 		ether_addr_copy(buf->data.ra, priv->current_net_addr);
 
 		return vnt_rxtx_datahead_g_fb(tx_context, &buf->data_head);
-	} else {
-		struct vnt_cts *buf = &head->cts_g;
-		/* Get SignalField,ServiceField,Length */
-		vnt_get_phy_field(priv, cts_frame_len,
-			priv->top_cck_basic_rate, PK_TYPE_11B, &buf->b);
-		/* Get CTSDuration_ba */
-		buf->duration_ba =
-			vnt_get_rtscts_duration_le(tx_context, CTSDUR_BA,
-						   tx_context->pkt_type,
-						   current_rate);
-		/*Get CTS Frame body*/
-		buf->data.duration = buf->duration_ba;
-		buf->data.frame_control =
-			cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTS);
+	}
+	struct vnt_cts *buf = &head->cts_g;
+	/* Get SignalField,ServiceField,Length */
+	vnt_get_phy_field(priv, cts_frame_len,
+		priv->top_cck_basic_rate, PK_TYPE_11B, &buf->b);
+	/* Get CTSDuration_ba */
+	buf->duration_ba =
+		vnt_get_rtscts_duration_le(tx_context, CTSDUR_BA,
+					   tx_context->pkt_type,
+					   current_rate);
+	/*Get CTS Frame body*/
+	buf->data.duration = buf->duration_ba;
+	buf->data.frame_control =
+		cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTS);
 
-		ether_addr_copy(buf->data.ra, priv->current_net_addr);
+	ether_addr_copy(buf->data.ra, priv->current_net_addr);
 
-		return vnt_rxtx_datahead_g(tx_context, &buf->data_head);
-	}
+	return vnt_rxtx_datahead_g(tx_context, &buf->data_head);
 }
 
 static u16 vnt_rxtx_rts(struct vnt_usb_send_context *tx_context,
-- 
2.2.2

--
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