aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-03-01 20:15:44 (GMT)
committerJouni Malinen <j@w1.fi>2015-03-01 20:36:53 (GMT)
commit9feadba141a8244055c67ed3b508611a02ea8953 (patch)
tree7404d46cf8ac5af15ed6abec500134abab78eb44
parentbfc048b48f490a828f3bffd7c8b397dc131fc17c (diff)
downloadhostap-9feadba141a8244055c67ed3b508611a02ea8953.zip
hostap-9feadba141a8244055c67ed3b508611a02ea8953.tar.gz
hostap-9feadba141a8244055c67ed3b508611a02ea8953.tar.bz2
Remove unnecessary NULL check to make function more consistent
Static analyzers may warn about dereference before NULL check in wpas_network_disabled() due to the new code added to check wpa_s->p2p_mgmt. wpa_s cannot be NULL here, so remove the unneeded check for it later in the function. (CID 106124) Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--wpa_supplicant/wpa_supplicant.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 5848202..19fb890 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -4986,7 +4986,7 @@ int wpas_network_disabled(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
if (ssid->disabled)
return 1;
- if (wpa_s && wpa_s->drv_capa_known)
+ if (wpa_s->drv_capa_known)
drv_enc = wpa_s->drv_enc;
else
drv_enc = (unsigned int) -1;