summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-03-11 22:53:33 +0100
committerWolfgang Denk <wd@pollux.denx.de>2006-03-11 22:53:33 +0100
commitd52fb7e3d135704334bd6f97f3444e824665b76f (patch)
treee1e91e323b603533acda1c1de53388c588e3753c /common
parent4367a01036bdb67e7fc3000cedba7195fbdee304 (diff)
Some code cleanup for GCC 4.x
Diffstat (limited to 'common')
-rw-r--r--common/env_nand.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/common/env_nand.c b/common/env_nand.c
index 4ae68c5a23e..dd27f7b629c 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();