From 5a5aab7f408102ff83a381b47c39e5d282ad597a Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 24 Jan 2015 19:36:55 +0200 Subject: [PATCH] Interworking: Remove unnecessary NULL check nai_realm_find_eap() is called only in cases where the cred pointer is not NULL. Signed-off-by: Jouni Malinen --- wpa_supplicant/interworking.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c index 3e919bd24..1d00fc6b6 100644 --- a/wpa_supplicant/interworking.c +++ b/wpa_supplicant/interworking.c @@ -649,8 +649,7 @@ static struct nai_realm_eap * nai_realm_find_eap(struct wpa_cred *cred, { u8 e; - if (cred == NULL || - cred->username == NULL || + if (cred->username == NULL || cred->username[0] == '\0' || ((cred->password == NULL || cred->password[0] == '\0') &&