SMBIOS: Avoid sizeof
on struct type
Where applicable, use the size of the associated variable. Change-Id: Ibbac2a82893232a6f87182a6a965b84a599d633e Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55904 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
This commit is contained in:
committed by
Patrick Georgi
parent
c6dab80b1c
commit
35b99c64e6
@@ -594,7 +594,7 @@ static inline u8 *elog_flash_offset_to_address(void)
|
||||
int elog_smbios_write_type15(unsigned long *current, int handle)
|
||||
{
|
||||
struct smbios_type15 *t = (struct smbios_type15 *)*current;
|
||||
int len = sizeof(struct smbios_type15);
|
||||
int len = sizeof(*t);
|
||||
uintptr_t log_address;
|
||||
|
||||
size_t elog_size = region_device_sz(&elog_state.nv_dev);
|
||||
|
Reference in New Issue
Block a user