From: Jouni Malinen Date: Sat, 26 Feb 2022 09:22:04 +0000 (+0200) Subject: Remove duplicated pointer check X-Git-Tag: hostap_2_11~2206 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bd29c1768e545d36675d73e8cf449e14530eff8;p=thirdparty%2Fhostap.git Remove duplicated pointer check The following if statement verifies the exact same thing here. Signed-off-by: Jouni Malinen --- diff --git a/src/ap/sta_info.c b/src/ap/sta_info.c index 62620e2a8..c397e60dd 100644 --- a/src/ap/sta_info.c +++ b/src/ap/sta_info.c @@ -1252,8 +1252,6 @@ const char * ap_sta_wpa_get_keyid(struct hostapd_data *hapd, for (psk = ssid->wpa_psk; psk; psk = psk->next) if (os_memcmp(pmk, psk->psk, PMK_LEN) == 0) break; - if (!psk) - return NULL; if (!psk || !psk->keyid[0]) return NULL;