diff options
Diffstat (limited to 'common/env_nand.c')
-rw-r--r-- | common/env_nand.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/common/env_nand.c b/common/env_nand.c index 4ae68c5..dd27f7b 100644 --- a/common/env_nand.c +++ b/common/env_nand.c @@ -112,7 +112,8 @@ int env_init(void) */ int saveenv(void) { - int total, ret = 0; + ulong total; + int ret = 0; puts ("Erasing Nand..."); if (nand_erase(&nand_info[0], CFG_ENV_OFFSET, CFG_ENV_SIZE)) @@ -120,8 +121,7 @@ int saveenv(void) puts ("Writing to Nand... "); total = CFG_ENV_SIZE; - ret = nand_write(&nand_info[0], CFG_ENV_OFFSET, &total, - (u_char*) env_ptr); + ret = nand_write(&nand_info[0], CFG_ENV_OFFSET, &total, (u_char*)env_ptr); if (ret || total != CFG_ENV_SIZE) return 1; @@ -138,11 +138,11 @@ int saveenv(void) void env_relocate_spec (void) { #if !defined(ENV_IS_EMBEDDED) - int ret, total; + ulong total; + int ret; total = CFG_ENV_SIZE; - ret = nand_read(&nand_info[0], CFG_ENV_OFFSET, &total, - (u_char*) env_ptr); + ret = nand_read(&nand_info[0], CFG_ENV_OFFSET, &total, (u_char*)env_ptr); if (ret || total != CFG_ENV_SIZE) return use_default(); |