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
|
@ -1169,7 +1169,7 @@ static struct dh_group dh_groups[] = {
|
|||
#endif /* ALL_DH_GROUPS */
|
||||
};
|
||||
|
||||
#define NUM_DH_GROUPS (sizeof(dh_groups) / sizeof(dh_groups[0]))
|
||||
#define NUM_DH_GROUPS ARRAY_SIZE(dh_groups)
|
||||
|
||||
|
||||
const struct dh_group * dh_groups_get(int id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue