Commit e17f46c6 authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman

staging: rtl8188eu: replace while with shorter for loop

Simplify rtw_get_rateset_len() by replacing the while loop
with a shorter for loop. Also replace tabs with spaces in
the definition line.
Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 50730e79
...@@ -202,15 +202,11 @@ void rtw_set_supported_rate(u8 *SupportedRates, uint mode) ...@@ -202,15 +202,11 @@ void rtw_set_supported_rate(u8 *SupportedRates, uint mode)
uint rtw_get_rateset_len(u8 *rateset) uint rtw_get_rateset_len(u8 *rateset)
{ {
uint i = 0; uint i;
while (1) { for (i = 0; i < 13; i++)
if ((rateset[i]) == 0) if (rateset[i] == 0)
break;
if (i > 12)
break; break;
i++;
}
return i; return i;
} }
......
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