summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2015-05-13 19:54:18 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2015-05-15 07:16:14 +0200
commit8c15d0505456d9861ad4b373bdd9342031ea276f (patch)
treea77a8d72210394baed9ce323ebfb0e109652c94c
parent6984e82c84e7c1b5390bd4d7450d89814e3840f1 (diff)
downloadbarebox-8c15d0505456d9861ad4b373bdd9342031ea276f.tar.gz
common/memtest.c: Fix incorrect array boundary check
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--common/memtest.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/common/memtest.c b/common/memtest.c
index 25a97d8..3b0bcb7 100644
--- a/common/memtest.c
+++ b/common/memtest.c
@@ -91,8 +91,7 @@ int mem_test(resource_size_t _start,
* '0's and '0' bits through a field of '1's (i.e.
* pattern and ~pattern).
*/
- for (i = 0; i < ARRAY_SIZE(bitpattern)/
- sizeof(resource_size_t); i++) {
+ for (i = 0; i < ARRAY_SIZE(bitpattern); i++) {
val = bitpattern[i];
for (; val != 0; val <<= 1) {