diff options
author | Peng Fan <peng.fan@nxp.com> | 2015-12-23 12:07:24 +0800 |
---|---|---|
committer | fang hui <hui.fang@freescale.com> | 2016-03-16 13:48:13 +0800 |
commit | 179ac6cee9f76f05262337ebff5699bdff4c333f (patch) | |
tree | b750a0ba882b20ecb242da80479eab66d6b2d75f /common/env_flags.c | |
parent | a37cf3210a026e362c876161b19776c9027eabc3 (diff) | |
download | u-boot-imx-179ac6cee9f76f05262337ebff5699bdff4c333f.zip u-boot-imx-179ac6cee9f76f05262337ebff5699bdff4c333f.tar.gz u-boot-imx-179ac6cee9f76f05262337ebff5699bdff4c333f.tar.bz2 |
common: env: initialize scalar variable
Before calling hsearch_r, initialize callback entry to NULL.
Coverity log:
"
Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value e.
Field e.callback is uninitialized when calling hsearch_r.
"
Reported-by: Coverity
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
(cherry picked from commit 5a6894397a657edec5d0cf4e20968cc66a368c51)
Diffstat (limited to 'common/env_flags.c')
-rw-r--r-- | common/env_flags.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/env_flags.c b/common/env_flags.c index 985f92e..815aff9 100644 --- a/common/env_flags.c +++ b/common/env_flags.c @@ -441,6 +441,7 @@ static int set_flags(const char *name, const char *value) e.key = name; e.data = NULL; + e.callback = NULL; hsearch_r(e, FIND, &ep, &env_htab, 0); /* does the env variable actually exist? */ |