Message ID | 20190429032834.7550-1-xiaolei.li@mediatek.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mtd-tests: nandbiterrs: Fix issue that just insert error at bit 7 | expand |
Applied to mtd-utils.git master. Thanks, David
diff --git a/tests/mtd-tests/nandbiterrs.c b/tests/mtd-tests/nandbiterrs.c index 24a6c03..f583c14 100644 --- a/tests/mtd-tests/nandbiterrs.c +++ b/tests/mtd-tests/nandbiterrs.c @@ -333,7 +333,7 @@ static int insert_biterror(void) int bit, mask, byte; for (byte = 0; byte < pagesize; ++byte) { - for (bit = 7, mask = 0x80; bit >= 0; bit--, mask>>=0) { + for (bit = 7, mask = 0x80; bit >= 0; bit--, mask >>= 1) { if (wbuffer[byte] & mask) { wbuffer[byte] &= ~mask; printf("Inserted biterror @ %u/%u\n", byte, bit);