[PATCH 2/3] commands: nandtest: Fix incorrect size for memset in do_nandtest

Alexander Shiyan shc_work at mail.ru
Sun Jul 7 08:27:16 EDT 2013


Signed-off-by: Alexander Shiyan <shc_work at mail.ru>
---
 commands/nandtest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commands/nandtest.c b/commands/nandtest.c
index ba15ecf..f6e8f99 100644
--- a/commands/nandtest.c
+++ b/commands/nandtest.c
@@ -181,7 +181,7 @@ static int do_nandtest(int argc, char *argv[])
 	markbad = 0;
 	fd = -1;
 
-	memset(ecc_stats, 0, MAX_ECC_BITS);
+	memset(ecc_stats, 0, sizeof(*ecc_stats));
 
 	while ((opt = getopt(argc, argv, "ms:i:o:l:t")) > 0) {
 		switch (opt) {
-- 
1.8.1.5




More information about the barebox mailing list