From c5b950b6af785c46b3ddc5036457a7f012d984a9 Mon Sep 17 00:00:00 2001 From: Sunil Ravi Date: Fri, 16 Sep 2022 12:22:02 -0700 Subject: [PATCH] Fix compilation error due to use of bitwise '&' with boolean operands 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 --- wpa_supplicant/wpa_supplicant.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index e085391e2..761017248 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -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 */