Sol Boucher (solb@chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10131
-gerrit
commit 7b9a0713e0670fa88bbeab493a0f3f87488ecdc2 Author: Sol Boucher solb@chromium.org Date: Tue May 5 20:35:26 2015 -0700
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 --- util/cbfstool/cbfs_image.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c index 3df291a..16dc3dc 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;