From f3bba44a04a966198ed0896f3b516e1d5909769b Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Fri, 5 Aug 2016 08:12:31 -0700 Subject: cbfstool/cbfs_image: Initialze empty_sz to 0 Change-Id: I8b9cfe56b5893ba11047fcc1a6727e7e12a15772 Signed-off-by: Furquan Shaikh Found-by: Coverity Scan # 1361276 Reviewed-on: https://review.coreboot.org/16071 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- util/cbfstool/cbfs_image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c index 1e38e4ea8b..9e63692f47 100644 --- a/util/cbfstool/cbfs_image.c +++ b/util/cbfstool/cbfs_image.c @@ -1049,7 +1049,6 @@ static int cbfs_payload_make_elf(struct buffer *buff, uint32_t arch) struct cbfs_payload_segment *segs; struct elf_writer *ew; struct buffer elf_out; - size_t empty_sz; int segments = 0; if (arch == CBFS_ARCHITECTURE_UNKNOWN) { @@ -1115,6 +1114,7 @@ static int cbfs_payload_make_elf(struct buffer *buff, uint32_t arch) for (int i = 0; i < segments; i++) { struct buffer tbuff; + size_t empty_sz = 0; memset(&shdr, 0, sizeof(shdr)); char *name = NULL; -- cgit v1.2.3