libertas: fix uninitialized variable warning

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Tuesday, June 1, 2010 - 9:59 am

Gitweb:     http://git.kernel.org/linus/c6a6368b32aa4fd145e840c8d8dac6923fae2688
Commit:     c6a6368b32aa4fd145e840c8d8dac6923fae2688
Parent:     7c9fd60f9764373414c0a64f500a78635b0a0a7b
Author:     Prarit Bhargava <prarit@redhat.com>
AuthorDate: Thu May 27 14:41:20 2010 -0400
Committer:  John W. Linville <linville@tuxdriver.com>
CommitDate: Fri May 28 13:41:00 2010 -0400

    libertas: fix uninitialized variable warning
    
    Fixes:
    
    drivers/net/wireless/libertas/rx.c: In function process_rxed_802_11_packet:
    drivers/net/wireless/libertas/rx.c:354: error: radiotap_hdr.flags may be used uninitialized in this function
    
    Signed-off-by: Prarit Bhargava <prarit@redhat.com>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 drivers/net/wireless/libertas/rx.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c
index a115bfa..7a377f5 100644
--- a/drivers/net/wireless/libertas/rx.c
+++ b/drivers/net/wireless/libertas/rx.c
@@ -329,9 +329,8 @@ static int process_rxed_802_11_packet(struct lbs_private *priv,
 	/* create the exported radio header */
 
 	/* radiotap header */
-	radiotap_hdr.hdr.it_version = 0;
-	/* XXX must check this value for pad */
-	radiotap_hdr.hdr.it_pad = 0;
+	memset(&radiotap_hdr, 0, sizeof(radiotap_hdr));
+	/* XXX must check radiotap_hdr.hdr.it_pad for pad */
 	radiotap_hdr.hdr.it_len = cpu_to_le16 (sizeof(struct rx_radiotap_hdr));
 	radiotap_hdr.hdr.it_present = cpu_to_le32 (RX_RADIOTAP_PRESENT);
 	radiotap_hdr.rate = convert_mv_rate_to_radiotap(prxpd->rx_rate);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
libertas: fix uninitialized variable warning, Linux Kernel Mailing ..., (Tue Jun 1, 9:59 am)