From be8f0fa2bb43f80915d0635c06fbfda0285f113f Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Fri, 29 Jul 2016 21:55:44 +0200 Subject: util/cbmem: Initialize variable There can be cases where "found" wasn't initialized, do so. Change-Id: Ifef8d61daa70e27ec39b7a8f3481d2316dfaa36e Signed-off-by: Patrick Georgi Found-by: Coverity Scan #1347334 Reviewed-on: https://review.coreboot.org/15969 Tested-by: build bot (Jenkins) Reviewed-by: Duncan Laurie Reviewed-by: Paul Menzel --- util/cbmem/cbmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/cbmem/cbmem.c') diff --git a/util/cbmem/cbmem.c b/util/cbmem/cbmem.c index 5e56d11db4..885d460252 100644 --- a/util/cbmem/cbmem.c +++ b/util/cbmem/cbmem.c @@ -259,7 +259,7 @@ static struct lb_cbmem_ref parse_cbmem_ref(struct lb_cbmem_ref *cbmem_ref) static int parse_cbtable(u64 address, size_t table_size, uint8_t abort_on_failure) { - int i, found, ret = 0; + int i, found = 0, ret = 0; void *buf; debug("Looking for coreboot table at %" PRIx64 " %zd bytes.\n", -- cgit v1.2.3