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 <vapier@gentoo.org>
This commit is contained in:
Mike Frysinger
2011-07-26 16:48:33 +02:00
committed by Wolfgang Denk
parent 9146d13821
commit d2397817f1
25 changed files with 28 additions and 52 deletions
+1 -1
View File
@@ -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;