From a7e98ad5145bb57fd18d199f915c76ef376cf227 Mon Sep 17 00:00:00 2001 From: Vikram Kanigiri Date: Wed, 4 Mar 2015 10:34:27 +0000 Subject: 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 --- include/common/bl_common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/common/bl_common.h') diff --git a/include/common/bl_common.h b/include/common/bl_common.h index 0959c893..b36c9d35 100644 --- a/include/common/bl_common.h +++ b/include/common/bl_common.h @@ -108,6 +108,8 @@ #include #include +#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. -- cgit