diff options
author | Vikram Kanigiri <vikram.kanigiri@arm.com> | 2015-03-04 10:34:27 +0000 |
---|---|---|
committer | Vikram Kanigiri <vikram.kanigiri@arm.com> | 2015-03-16 18:37:34 +0000 |
commit | a7e98ad5145bb57fd18d199f915c76ef376cf227 (patch) | |
tree | b73a3f97e20741461f98f65d6967cb9f5ac1ea69 /include/common/bl_common.h | |
parent | 5930eadbe5d8d4c3f15fd910476f72cd5bf86f44 (diff) | |
download | platform_external_arm-trusted-firmware-a7e98ad5145bb57fd18d199f915c76ef376cf227.tar.gz platform_external_arm-trusted-firmware-a7e98ad5145bb57fd18d199f915c76ef376cf227.tar.bz2 platform_external_arm-trusted-firmware-a7e98ad5145bb57fd18d199f915c76ef376cf227.zip |
Add macro to calculate number of elements in an array
This patch defines the ARRAY_SIZE macro for calculating number of elements
in an array and uses it where appropriate.
Change-Id: I72746a9229f0b259323972b498b9a3999731bc9b
Diffstat (limited to 'include/common/bl_common.h')
-rw-r--r-- | include/common/bl_common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/common/bl_common.h b/include/common/bl_common.h index 0959c893a..b36c9d35d 100644 --- a/include/common/bl_common.h +++ b/include/common/bl_common.h @@ -108,6 +108,8 @@ #include <stdint.h> #include <stddef.h> +#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) + /******************************************************************************* * Structure used for telling the next BL how much of a particular type of * memory is available for its use and how much is already used. |