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

staging: rtl8723bs: replace while with shorter for loop

Simplify rtw_get_rateset_len() by replacing the while loop
with a shorter for loop.
Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0bde13ed
...@@ -298,17 +298,11 @@ void rtw_set_supported_rate(u8 *SupportedRates, uint mode) ...@@ -298,17 +298,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