]> www.infradead.org Git - mtd-utils.git/commitdiff
Fix repeated warning about ECC correction, in nandtest
authorDavid Woodhouse <dwmw2@infradead.org>
Thu, 9 Aug 2007 15:25:04 +0000 (23:25 +0800)
committerDavid Woodhouse <dwmw2@infradead.org>
Thu, 9 Aug 2007 15:25:04 +0000 (23:25 +0800)
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
nandtest.c

index 254d41f854086392faad2b797acd824dc7682b88..f0cbf859f22457b461631fa5424b3f43468772a2 100644 (file)
@@ -142,11 +142,11 @@ int main(int argc, char **argv)
                
                        if (newstats.corrected > oldstats.corrected) {
                                printf("\nECC corrected at %08x\n", (unsigned) ofs);
-                               newstats.corrected = oldstats.corrected;
+                               oldstats.corrected = newstats.corrected;
                        }
                        if (newstats.failed > oldstats.failed) {
                                printf("\nECC failed at %08x\n", (unsigned) ofs);
-                               newstats.corrected = oldstats.corrected;
+                               oldstats.corrected = newstats.corrected;
                        }
                        if (len < meminfo.erasesize)
                                exit(1);