From 0bd29c1768e545d36675d73e8cf449e14530eff8 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 26 Feb 2022 11:22:04 +0200 Subject: [PATCH] Remove duplicated pointer check The following if statement verifies the exact same thing here. Signed-off-by: Jouni Malinen --- src/ap/sta_info.c | 2 -- 1 file changed, 2 deletions(-) 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;