summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSol Boucher <solb@chromium.org>2015-05-05 20:35:26 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-05-08 20:24:42 +0200
commit5bad3954bf32f83ffd85dab90797b24103fc994a (patch)
tree658ad219cc970c9ff4c53f3adc1871212b4eb6c2
parent3e060ed112c5ec3a5fa58b68174dd57708af1d89 (diff)
cbfstool: Eliminate useless cbfs_image_create() local variable
The only operation performed on this struct turned out to be sizeof... Change-Id: I619db60ed2e7ef6c196dd2600dc83bad2fdc6a55 Signed-off-by: Sol Boucher <solb@chromium.org> Reviewed-on: http://review.coreboot.org/10131 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
-rw-r--r--util/cbfstool/cbfs_image.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c
index 3df291a2c0..16dc3dcab4 100644
--- a/util/cbfstool/cbfs_image.c
+++ b/util/cbfstool/cbfs_image.c
@@ -191,7 +191,6 @@ int cbfs_image_create(struct cbfs_image *image,
uint32_t header_offset,
uint32_t entries_offset)
{
- struct cbfs_header header;
struct cbfs_file *entry;
int32_t *rel_offset;
uint32_t cbfs_len;
@@ -200,8 +199,8 @@ int cbfs_image_create(struct cbfs_image *image,
DEBUG("cbfs_image_create: bootblock=0x%x+0x%zx, "
"header=0x%x+0x%zx, entries_offset=0x%x\n",
- bootblock_offset, bootblock->size,
- header_offset, sizeof(header), entries_offset);
+ bootblock_offset, bootblock->size, header_offset,
+ sizeof(image->header), entries_offset);
// This attribute must be given in order to prove that this module
// correctly preserves certain CBFS properties. See the block comment
@@ -245,9 +244,9 @@ int cbfs_image_create(struct cbfs_image *image,
bootblock->size);
// Prepare header
- if (header_offset + sizeof(header) > size - sizeof(int32_t)) {
+ if (header_offset + sizeof(image->header) > size - sizeof(int32_t)) {
ERROR("Header (0x%x+0x%zx) exceed ROM size (0x%zx)\n",
- header_offset, sizeof(header), size);
+ header_offset, sizeof(image->header), size);
return -1;
}
image->header.magic = CBFS_HEADER_MAGIC;