diff options
author | Furquan Shaikh <furquan@google.com> | 2016-08-05 08:12:31 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2016-08-08 13:01:16 +0200 |
commit | f3bba44a04a966198ed0896f3b516e1d5909769b (patch) | |
tree | dfcbf11410e21c5ef7dc02c96a86837374af4c05 /util/cbfstool/cbfs_image.c | |
parent | 61486b506d5f3be1ea02aa82df290bd7c18b1fda (diff) | |
download | coreboot-f3bba44a04a966198ed0896f3b516e1d5909769b.tar.xz |
cbfstool/cbfs_image: Initialze empty_sz to 0
Change-Id: I8b9cfe56b5893ba11047fcc1a6727e7e12a15772
Signed-off-by: Furquan Shaikh <furquan@google.com>
Found-by: Coverity Scan # 1361276
Reviewed-on: https://review.coreboot.org/16071
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'util/cbfstool/cbfs_image.c')
-rw-r--r-- | util/cbfstool/cbfs_image.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |