misc: use consistent data type for ARRAY_SIZE

Some arches this is an unsigned int, some an unsigned long.
Standardize on unsigned long for all arches.

Change-Id: I1661ea2d895915c0be3eaabdb79d90435f3945b0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2015-08-05 10:04:55 -07:00 committed by Anas Nashif
commit ca90a0a366

View file

@ -42,7 +42,7 @@ Misc utilities usable by nanokernel, microkernel, and application code.
extern "C" {
#endif
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
#define ARRAY_SIZE(array) ((unsigned long)(sizeof(array) / sizeof((array)[0])))
#define CONTAINER_OF(ptr, type, field) \
((type *)(((char *)(ptr)) - offsetof(type, field)))