diff options
author | Ollie Lho <ollie@sis.com.tw> | 2004-03-20 17:05:01 +0000 |
---|---|---|
committer | Ollie Lho <ollie@sis.com.tw> | 2004-03-20 17:05:01 +0000 |
commit | f51a766f89a3d37ef4f6e4898621b91c8912e566 (patch) | |
tree | 1c4f5832d77614404325b377af8ec9cb78983347 /flash_rom.c | |
parent | 761bf1bdb7268f8818dd22b15e944365afdf1459 (diff) | |
download | ast2050-flashrom-f51a766f89a3d37ef4f6e4898621b91c8912e566.zip ast2050-flashrom-f51a766f89a3d37ef4f6e4898621b91c8912e566.tar.gz |
I have no idea what i was trying to show off when I used the while loop rather than for loop
Please forgive me, I was too young 4 years ago.
Corresponding to flashrom svn r16 and coreboot v2 svn r1458.
Diffstat (limited to 'flash_rom.c')
-rw-r--r-- | flash_rom.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/flash_rom.c b/flash_rom.c index 0213005..dff8d18 100644 --- a/flash_rom.c +++ b/flash_rom.c @@ -148,12 +148,12 @@ struct flashchip *probe_flash(struct flashchip *flash) int verify_flash(struct flashchip *flash, char *buf, int verbose) { - int i = 0; + int i; int total_size = flash->total_size * 1024; volatile char *bios = flash->virt_addr; printf("Verifying address: "); - while (i < total_size) { + for (i = 0; i < total_size; i++) { if (verbose) printf("0x%08x", i); if (*(bios + i) != *(buf + i)) { @@ -162,7 +162,6 @@ int verify_flash(struct flashchip *flash, char *buf, int verbose) } if (verbose) printf("\b\b\b\b\b\b\b\b\b\b"); - i++; } if (verbose) printf("\n"); |