]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix compilation error due to use of bitwise '&' with boolean operands
authorSunil Ravi <sunilravi@google.com>
Fri, 16 Sep 2022 19:22:02 +0000 (12:22 -0700)
committerJouni Malinen <j@w1.fi>
Thu, 22 Sep 2022 21:37:30 +0000 (00:37 +0300)
Compiler throws a warning for using bitwise operation in
wpa_s_setup_sae_pt() function instead of logical AND operation on two
boolean values.

Fixes: e81ec0962d02 ("SAE: Use H2E unconditionally with the new AKM suites")
Signed-off-by: Sunil Ravi <sunilravi@google.com>
wpa_supplicant/wpa_supplicant.c

index e085391e2ed5deb76a2ba598d9a062e26cafad85..761017248d3710228a48f0b589722cefd3ed6760 100644 (file)
@@ -2280,7 +2280,7 @@ void wpa_s_setup_sae_pt(struct wpa_config *conf, struct wpa_ssid *ssid)
 
        if (!password ||
            (conf->sae_pwe == 0 && !ssid->sae_password_id &&
-            !wpa_key_mgmt_sae_ext_key(ssid->key_mgmt) &
+            !wpa_key_mgmt_sae_ext_key(ssid->key_mgmt) &&
             !sae_pk_valid_password(password)) ||
            conf->sae_pwe == 3) {
                /* PT derivation not needed */