Remove unnecessary local variable

The ssid parameter (if NULL) can be used for the loop, too, to make the
code look a bit prettier.

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2013-03-10 17:45:15 +02:00
parent dca1a51149
commit 14f7907890

View File

@ -1755,12 +1755,9 @@ static void wpa_supplicant_enable_one_network(struct wpa_supplicant *wpa_s,
void wpa_supplicant_enable_network(struct wpa_supplicant *wpa_s,
struct wpa_ssid *ssid)
{
struct wpa_ssid *other_ssid;
if (ssid == NULL) {
for (other_ssid = wpa_s->conf->ssid; other_ssid;
other_ssid = other_ssid->next)
wpa_supplicant_enable_one_network(wpa_s, other_ssid);
for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next)
wpa_supplicant_enable_one_network(wpa_s, ssid);
} else
wpa_supplicant_enable_one_network(wpa_s, ssid);