mainboard: Make use of ARRAY_SIZE in buildOpts.c on AGESA platforms
Found using coccinelle.
Change-Id: I406de6cfe25d3b471dbb6f98d9c62addae008de3
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/6195
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
diff --git a/src/mainboard/amd/thatcher/buildOpts.c b/src/mainboard/amd/thatcher/buildOpts.c
index 87f0460..bc2ff12 100644
--- a/src/mainboard/amd/thatcher/buildOpts.c
+++ b/src/mainboard/amd/thatcher/buildOpts.c
@@ -33,6 +33,7 @@
* @e \$Revision: 23714 $ @e \$Date: 2009-12-09 17:28:37 -0600 (Wed, 09 Dec 2009) $
*/
+#include <stdlib.h>
#include "AGESA.h"
//#include "CommonReturns.h"
#include "Filecode.h"
@@ -496,7 +497,7 @@
// TABLE END
NBACCESS (MTEnd, 0, 0, 0, 0, 0), // End of Table
};
-UINT8 SizeOfTableTN = sizeof (AGESA_MEM_TABLE_TN) / sizeof (AGESA_MEM_TABLE_TN[0]);
+UINT8 SizeOfTableTN = ARRAY_SIZE(AGESA_MEM_TABLE_TN);
/* ***************************************************************************
* Optional User code to be included into the AGESA build