From d2397817f12d246cfd88caefd6f12dfd3e2d2c17 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 10 May 2011 07:28:35 +0000 Subject: post: use ARRAY_SIZE We've got a handy dandy macro already for calculating the number of elements in an array, so use it. Signed-off-by: Mike Frysinger --- post/drivers/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'post/drivers') diff --git a/post/drivers/memory.c b/post/drivers/memory.c index 3f47449f19..4cca035784 100644 --- a/post/drivers/memory.c +++ b/post/drivers/memory.c @@ -225,7 +225,7 @@ const unsigned long long otherpattern = 0x0123456789abcdefULL; static int memory_post_dataline(unsigned long long * pmem) { unsigned long long temp64 = 0; - int num_patterns = sizeof(pattern)/ sizeof(pattern[0]); + int num_patterns = ARRAY_SIZE(pattern); int i; unsigned int hi, lo, pathi, patlo; int ret = 0; -- cgit v1.2.1