]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Remove duplicated pointer check
authorJouni Malinen <quic_jouni@quicinc.com>
Sat, 26 Feb 2022 09:22:04 +0000 (11:22 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 26 Feb 2022 17:12:11 +0000 (19:12 +0200)
The following if statement verifies the exact same thing here.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/ap/sta_info.c

index 62620e2a8d3e17606aa77c2669cf4609730812c5..c397e60ddd7ecfc9d3eac754bc9ef5f3bab4c42e 100644 (file)
@@ -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;