From: Jouni Malinen Date: Sun, 16 Oct 2011 10:16:21 +0000 (+0300) Subject: Remove unnecessary wpa_s == NULL validation X-Git-Tag: hostap-1-bp~159 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86c6626c5bf0c52dc8bc9ced07fda1a02fde36ba;p=thirdparty%2Fhostap.git Remove unnecessary wpa_s == NULL validation wpa_s cannot be NULL here (it is already dereferenced above and all the callers pass a valid pointer anyway). --- diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c index 39cf40155..9bb5fafef 100644 --- a/wpa_supplicant/dbus/dbus_new.c +++ b/wpa_supplicant/dbus/dbus_new.c @@ -1894,8 +1894,7 @@ int wpas_dbus_unregister_network(struct wpa_supplicant *wpa_s, int nid) #endif /* CONFIG_P2P */ /* Do nothing if the control interface is not turned on */ - if (wpa_s == NULL || wpa_s->global == NULL || - wpa_s->dbus_new_path == NULL) + if (wpa_s->global == NULL || wpa_s->dbus_new_path == NULL) return 0; ctrl_iface = wpa_s->global->dbus; if (ctrl_iface == NULL)