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:
Jouni Malinen 2013-10-26 17:00:57 +03:00
parent 39044a7033
commit e7ecab4a3b
22 changed files with 51 additions and 56 deletions

View file

@ -268,7 +268,7 @@ int os_program_init(void)
struct __user_cap_header_struct header;
struct __user_cap_data_struct cap;
setgroups(sizeof(groups)/sizeof(groups[0]), groups);
setgroups(ARRAY_SIZE(groups), groups);
prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0);