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:
parent
91156d9c7a
commit
ca90a0a366
1 changed files with 1 additions and 1 deletions
|
@ -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)))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue