]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Remove unnecessary local variable
authorJouni Malinen <j@w1.fi>
Sun, 10 Mar 2013 15:45:15 +0000 (17:45 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 10 Mar 2013 15:45:15 +0000 (17:45 +0200)
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>

wpa_supplicant/wpa_supplicant.c

index 8db46533831e2a59ee5cbebeab4952af273aeefd..e88de43eee92be0e0d7447994b503243908ee940 100644 (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);