linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libertas: fix mode initialization problem
@ 2008-04-02 14:34 Holger Schurig
  2008-04-03  3:33 ` Dan Williams
  0 siblings, 1 reply; 2+ messages in thread
From: Holger Schurig @ 2008-04-02 14:34 UTC (permalink / raw)
  To: libertas-dev; +Cc: Dan Williams, linux-wireless, John W. Linville

After moving lbs_find_best_network_ssid() from scan.c to assoc.c gcc was
able to deduce that new_mode might stay uninitialized.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>

Index: wireless-testing/drivers/net/wireless/libertas/assoc.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/libertas/assoc.c	2008-04-02 14:29:48.000000000 +0200
+++ wireless-testing/drivers/net/wireless/libertas/assoc.c	2008-04-02 14:31:10.000000000 +0200
@@ -1021,7 +1021,7 @@ void lbs_association_worker(struct work_
 	}
 
 	if (find_any_ssid) {
-		u8 new_mode;
+		u8 new_mode = assoc_req->mode;
 
 		ret = lbs_find_best_network_ssid(priv, assoc_req->ssid,
 				&assoc_req->ssid_len, assoc_req->mode, &new_mode);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] libertas: fix mode initialization problem
  2008-04-02 14:34 [PATCH] libertas: fix mode initialization problem Holger Schurig
@ 2008-04-03  3:33 ` Dan Williams
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Williams @ 2008-04-03  3:33 UTC (permalink / raw)
  To: Holger Schurig; +Cc: libertas-dev, linux-wireless, John W. Linville

On Wed, 2008-04-02 at 16:34 +0200, Holger Schurig wrote:
> After moving lbs_find_best_network_ssid() from scan.c to assoc.c gcc was
> able to deduce that new_mode might stay uninitialized.
> 
> Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>

Acked-by: Dan Williams <dcbw@redhat.com>

> Index: wireless-testing/drivers/net/wireless/libertas/assoc.c
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/libertas/assoc.c	2008-04-02 14:29:48.000000000 +0200
> +++ wireless-testing/drivers/net/wireless/libertas/assoc.c	2008-04-02 14:31:10.000000000 +0200
> @@ -1021,7 +1021,7 @@ void lbs_association_worker(struct work_
>  	}
>  
>  	if (find_any_ssid) {
> -		u8 new_mode;
> +		u8 new_mode = assoc_req->mode;
>  
>  		ret = lbs_find_best_network_ssid(priv, assoc_req->ssid,
>  				&assoc_req->ssid_len, assoc_req->mode, &new_mode);


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-03  3:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-02 14:34 [PATCH] libertas: fix mode initialization problem Holger Schurig
2008-04-03  3:33 ` Dan Williams

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