diff options
author | Simon Glass <sjg@chromium.org> | 2013-08-15 21:29:38 -0600 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-08-25 16:57:27 -0700 |
commit | 47779880b28f2c549dd3349d8f28d68a0f784eb4 (patch) | |
tree | 1131d47b74428a8aa9079e0c6d4ee353d4668e1c /host/arch/arm/lib/crossystem_arch.c | |
parent | e4759b782dff166600dbbfac884462babb433fac (diff) | |
download | vboot-47779880b28f2c549dd3349d8f28d68a0f784eb4.tar.gz |
Improve kernel tests to pass valgrind
At present the kernel tests produce valgrind errors since the GPT data is
sometimes accessed before it is read. This is unnecessary, so update the
code to avoid this.
BUG=chrome-os-partner:21115
BRANCH=pit
TEST=manual
valgrind --leak-check=full ./build/tests/vboot_kernel_tests
See that we no longer get valgrind errors.
Change-Id: I9e9660e38a62a735cf01a37c2d81ddb5ab8b1528
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/66173
Diffstat (limited to 'host/arch/arm/lib/crossystem_arch.c')
-rw-r--r-- | host/arch/arm/lib/crossystem_arch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/host/arch/arm/lib/crossystem_arch.c b/host/arch/arm/lib/crossystem_arch.c index c1e2d398..033632e4 100644 --- a/host/arch/arm/lib/crossystem_arch.c +++ b/host/arch/arm/lib/crossystem_arch.c @@ -100,7 +100,7 @@ static int ReadFdtValue(const char *property, int *value) { } static int ReadFdtInt(const char *property) { - int value; + int value = 0; if (ReadFdtValue(property, &value)) return E_FAIL; return value; |