mirror of
https://github.com/Mange/rtl8192eu-linux-driver
synced 2024-11-25 23:15:00 +00:00
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.
This commit is contained in:
parent
879f617f82
commit
99c0f78547
@ -482,18 +482,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)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (i > 12)
|
for (i = 0; i < 13; i++)
|
||||||
|
if (rateset[i] == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user