[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1206220225000.7671@swampdragon.chaosbits.net>
Date: Fri, 22 Jun 2012 02:28:12 +0200 (CEST)
From: Jesper Juhl <jj@...osbits.net>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
cc: Forest Bond <forest@...ttletooquiet.net>,
Marcos Paulo de Souza <marcos.mage@...il.com>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH] staging: vt6656: Correct a few assignments to be compares
in iwctl_siwencodeext()
The result of "foo = bar" is true, so in statements such as
...
if((pDevice->bwextstep0 = TRUE)&&(param->u.wpa_key.key_index ==1))
...
an assignment is most likely not what was intended - a comparison was. As in:
...
if ((pDevice->bwextstep0 == TRUE) && (param->u.wpa_key.key_index == 1))
...
There are a 3 such mistakes in the iwctl_siwencodeext() function.
This patch fixes them all.
Signed-off-by: Jesper Juhl <jj@...osbits.net>
---
drivers/staging/vt6656/iwctl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
The file could also do with a serious style cleanup, but that's a
different (set of) patches. This one just fixes the bug.
diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c
index b24e531..5740438 100644
--- a/drivers/staging/vt6656/iwctl.c
+++ b/drivers/staging/vt6656/iwctl.c
@@ -1708,15 +1708,15 @@ if(param->u.wpa_key.alg_name == WPA_ALG_NONE) {
if(param->u.wpa_key.key_index ==0) {
pDevice->bwextstep0 = TRUE;
}
- if((pDevice->bwextstep0 = TRUE)&&(param->u.wpa_key.key_index ==1)) {
+ if ((pDevice->bwextstep0 == TRUE) && (param->u.wpa_key.key_index == 1)) {
pDevice->bwextstep0 = FALSE;
pDevice->bwextstep1 = TRUE;
}
- if((pDevice->bwextstep1 = TRUE)&&(param->u.wpa_key.key_index ==2)) {
+ if ((pDevice->bwextstep1 == TRUE) && (param->u.wpa_key.key_index == 2)) {
pDevice->bwextstep1 = FALSE;
pDevice->bwextstep2 = TRUE;
}
- if((pDevice->bwextstep2 = TRUE)&&(param->u.wpa_key.key_index ==3)) {
+ if ((pDevice->bwextstep2 == TRUE)&&(param->u.wpa_key.key_index == 3)) {
pDevice->bwextstep2 = FALSE;
pDevice->bwextstep3 = TRUE;
}
--
1.7.11
--
Jesper Juhl <jj@...osbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.
--
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