summaryrefslogtreecommitdiff
path: root/common/env_nand.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2011-06-01 21:59:27 +0200
committerWolfgang Denk <wd@denx.de>2011-06-01 21:59:27 +0200
commit8aebd75a4a7bfc6c7689e715bc1784c0add7d097 (patch)
tree518fe0547c2ea9eafdf2a9278e007e3f348163d6 /common/env_nand.c
parent9f084b1e04d2337eb2ae32a6357b14b1260761d6 (diff)
parenteb3abce898ce0d9c711ed1d107bd8b0ccf3c07de (diff)
Merge branch 'master' of /home/wd/git/u-boot/custodians
* 'master' of /home/wd/git/u-boot/custodians: cmd_nand: fix help of nand erase subcommand env_nand: zero-initialize variable nand_erase_options
Diffstat (limited to 'common/env_nand.c')
-rw-r--r--common/env_nand.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/common/env_nand.c b/common/env_nand.c
index 980425a8ee..14446a6a57 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -193,10 +193,8 @@ int saveenv(void)
int ret = 0;
nand_erase_options_t nand_erase_options;
+ memset(&nand_erase_options, 0, sizeof(nand_erase_options));
nand_erase_options.length = CONFIG_ENV_RANGE;
- nand_erase_options.quiet = 0;
- nand_erase_options.jffs2 = 0;
- nand_erase_options.scrub = 0;
if (CONFIG_ENV_RANGE < CONFIG_ENV_SIZE)
return 1;
@@ -249,10 +247,8 @@ int saveenv(void)
char *res;
nand_erase_options_t nand_erase_options;
+ memset(&nand_erase_options, 0, sizeof(nand_erase_options));
nand_erase_options.length = CONFIG_ENV_RANGE;
- nand_erase_options.quiet = 0;
- nand_erase_options.jffs2 = 0;
- nand_erase_options.scrub = 0;
nand_erase_options.offset = CONFIG_ENV_OFFSET;
if (CONFIG_ENV_RANGE < CONFIG_ENV_SIZE)