From: Jouni Malinen Date: Sat, 24 Jan 2015 17:36:55 +0000 (+0200) Subject: Interworking: Remove unnecessary NULL check X-Git-Tag: hostap_2_4~322 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a5aab7f408102ff83a381b47c39e5d282ad597a;p=thirdparty%2Fhostap.git 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 --- 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') &&