Use ARRAY_SIZE() macro
Replace the common sizeof(a)/sizeof(a[0]) constructions with a more readable version. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
39044a7033
commit
e7ecab4a3b
22 changed files with 51 additions and 56 deletions
|
@ -358,7 +358,7 @@ static int acs_usable_ht40_chan(struct hostapd_channel_data *chan)
|
|||
157, 184, 192 };
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < sizeof(allowed) / sizeof(allowed[0]); i++)
|
||||
for (i = 0; i < ARRAY_SIZE(allowed); i++)
|
||||
if (chan->chan == allowed[i])
|
||||
return 1;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue