Commit 72fb6c5a authored by Ivan Safonov's avatar Ivan Safonov Committed by Greg Kroah-Hartman

staging: rtl8188eu: while loop replaced by for loop

Here is more suitable for loop.
Signed-off-by: default avatarIvan Safonov <insafonov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2b5a10a9
......@@ -366,20 +366,13 @@ struct wlan_network *rtw_get_oldest_wlan_network(struct __queue *scanned_queue)
phead = get_list_head(scanned_queue);
plist = phead->next;
while (1) {
if (phead == plist)
break;
for (plist = phead->next; plist != phead; plist = plist->next) {
pwlan = container_of(plist, struct wlan_network, list);
if (!pwlan->fixed) {
if (oldest == NULL || time_after(oldest->last_scanned, pwlan->last_scanned))
oldest = pwlan;
}
plist = plist->next;
}
return oldest;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment