aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-10-26 14:00:57 (GMT)
committerJouni Malinen <j@w1.fi>2013-10-26 14:49:05 (GMT)
commite7ecab4a3b8bc5696ee6d9779bc9f9a1f8b4b6ed (patch)
tree85908522f34532000904ebcc47c331e7f0dfd942 /src/utils
parent39044a703348e50d9d35053baf1b9ba3f53efdbf (diff)
downloadhostap-e7ecab4a3b8bc5696ee6d9779bc9f9a1f8b4b6ed.zip
hostap-e7ecab4a3b8bc5696ee6d9779bc9f9a1f8b4b6ed.tar.gz
hostap-e7ecab4a3b8bc5696ee6d9779bc9f9a1f8b4b6ed.tar.bz2
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>
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/os_unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/os_unix.c b/src/utils/os_unix.c
index 40ad9d4..11946b4 100644
--- a/src/utils/os_unix.c
+++ b/src/utils/os_unix.c
@@ -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);