aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/notify.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2019-07-07 06:58:46 (GMT)
committerJouni Malinen <j@w1.fi>2019-07-07 07:00:49 (GMT)
commitd3a035169bbc6a67a98461dda1345a3f992c561f (patch)
treed5c998843dd51823668712ffca0b627b7873c026 /wpa_supplicant/notify.c
parentcd803299ca485eb857e37c88f973fccfbb8600e5 (diff)
downloadhostap-d3a035169bbc6a67a98461dda1345a3f992c561f.zip
hostap-d3a035169bbc6a67a98461dda1345a3f992c561f.tar.gz
hostap-d3a035169bbc6a67a98461dda1345a3f992c561f.tar.bz2
Remove useless NULL comparison for an array
Now that the TLS peer_cert information is provided as a full struct to handler functions, the altsubject pointer shows up as an array and causes static analyzers to warn about unnecessary NULL comparison. Get rid of that comparison now that it is clearly not needed anymore. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/notify.c')
-rw-r--r--wpa_supplicant/notify.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c
index dd627d0..e41d7c4 100644
--- a/wpa_supplicant/notify.c
+++ b/wpa_supplicant/notify.c
@@ -791,6 +791,8 @@ void wpas_notify_certification(struct wpa_supplicant *wpa_s,
struct tls_cert_data *cert,
const char *cert_hash)
{
+ int i;
+
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_EAP_PEER_CERT
"depth=%d subject='%s'%s%s%s",
cert->depth, cert->subject, cert_hash ? " hash=" : "",
@@ -812,14 +814,9 @@ void wpas_notify_certification(struct wpa_supplicant *wpa_s,
}
}
- if (cert->altsubject) {
- int i;
-
- for (i = 0; i < cert->num_altsubject; i++)
- wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_EAP_PEER_ALT
- "depth=%d %s", cert->depth,
- cert->altsubject[i]);
- }
+ for (i = 0; i < cert->num_altsubject; i++)
+ wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_EAP_PEER_ALT
+ "depth=%d %s", cert->depth, cert->altsubject[i]);
/* notify the new DBus API */
wpas_dbus_signal_certification(wpa_s, cert->depth, cert->subject,