diff options
author | Peng Fan <peng.fan@nxp.com> | 2016-01-14 17:14:00 +0800 |
---|---|---|
committer | guoyin.chen <guoyin.chen@freescale.com> | 2016-03-04 15:35:54 +0800 |
commit | 18f44905a030a4c16e5740da3e74160e5966e101 (patch) | |
tree | 94845484c2af0a1b9ec29c7799044f9cf3c98be9 /common/env_callback.c | |
parent | 1dc5e6a42f83d52d314e79c7d46ace9d848c1dc8 (diff) | |
download | u-boot-imx-18f44905a030a4c16e5740da3e74160e5966e101.zip u-boot-imx-18f44905a030a4c16e5740da3e74160e5966e101.tar.gz u-boot-imx-18f44905a030a4c16e5740da3e74160e5966e101.tar.bz2 |
MLK-12199 common:env fix unintialized scalar value
Reported by coverity ID: 17900 17902
Using uninitialized value e. Field e.flags is uninitialized when calling hsearch_r
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'common/env_callback.c')
-rw-r--r-- | common/env_callback.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/env_callback.c b/common/env_callback.c index 7de88fb..c7f002a 100644 --- a/common/env_callback.c +++ b/common/env_callback.c @@ -98,6 +98,7 @@ static int set_callback(const char *name, const char *value) e.key = name; e.data = NULL; e.callback = NULL; + e.flags = 0; hsearch_r(e, FIND, &ep, &env_htab, 0); /* does the env variable actually exist? */ |