Skip to content

Commit

Permalink
staging: vt6656: Correct a few assignments to be compares in iwctl_si…
Browse files Browse the repository at this point in the history
…wencodeext()

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@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Jesper Juhl authored and Greg Kroah-Hartman committed Jun 23, 2012
1 parent b15297e commit 70b3fd3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/vt6656/iwctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 70b3fd3

Please sign in to comment.