From: Dan Williams <dcbw@redhat.com>
To: Prarit Bhargava <prarit@redhat.com>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com
Subject: Re: [PATCH]: libertas: fix uninitialized variable warning
Date: Tue, 01 Jun 2010 22:29:28 -0700 [thread overview]
Message-ID: <1275456568.16492.12.camel@localhost.localdomain> (raw)
In-Reply-To: <20100527183717.24368.49914.sendpatchset@prarit.bos.redhat.com>
On Thu, 2010-05-27 at 14:41 -0400, Prarit Bhargava wrote:
> 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>
Acked-by: Dan Williams <dcbw@redhat.com>
>
> diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c
> index e2b8d88..2319bde 100644
> --- a/drivers/net/wireless/libertas/rx.c
> +++ b/drivers/net/wireless/libertas/rx.c
> @@ -330,9 +330,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 linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2010-06-02 5:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-27 18:41 [PATCH]: libertas: fix uninitialized variable warning Prarit Bhargava
2010-06-02 5:29 ` Dan Williams [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1275456568.16492.12.camel@localhost.localdomain \
--to=dcbw@redhat.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=prarit@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).