Scott Wood wrote: >> + size_t end; >> + int ret_val = 0; >> + end = offset + CFG_ENV_SIZE; >> + >> + for (; offset < end; offset += nand_info[0].erasesize) { >> + if (nand_block_isbad(&nand_info[0],offset)) >> + ret_val = 1; >> + } >> + >> + return ret_val; > > size_t end = offset + CFG_ENV_SIZE; > > while (offset < end) > if (nand_block_isbad(&nand_info[0], offset)) > return 1; > > return 0;
Err, with an offset increment in the loop, of course. -Scott ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users