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: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Michael Straube 2018-07-07 13:22:50 +02:00 committed by Greg Kroah-Hartman
parent 50730e79a2
commit e17f46c671
1 changed files with 4 additions and 8 deletions

View File

@ -200,17 +200,13 @@ 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) {
if ((rateset[i]) == 0)
for (i = 0; i < 13; i++)
if (rateset[i] == 0)
break;
if (i > 12)
break;
i++;
}
return i;
}