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>
This commit is contained in:
parent
3e060ed112
commit
5bad3954bf
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue