use standard ARRAY_SIZE() macro

Replace all the custom `sizeof(array)/sizeof(element)` and
`sizeof(array)/sizeof(type)` with the standard macro ARRAY_SIZE().
This commit is contained in:
Eric Engestrom 2018-07-30 14:29:34 +01:00
parent 5f8676f214
commit 021933f735
14 changed files with 33 additions and 23 deletions

View file

@ -6,6 +6,8 @@
#include <sys/types.h>
#include <xkbcommon/xkbcommon.h>
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a)[0])
/**
* Wrap i into the range [0, max[
*/