util: use cannonical form of ARRAY_SIZE

Namely sizeof(foo)/sizeof((foo)[0])

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
This commit is contained in:
Emil Velikov
2017-07-31 19:45:48 +01:00
committed by Emil Velikov
parent df83213702
commit c9ec28b1c0

View File

@@ -30,7 +30,7 @@
/* Compute the size of an array */
#ifndef ARRAY_SIZE
# define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
# define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#endif
/* For compatibility with Clang's __has_builtin() */