From a71071c96bd76c0021d702eb174e94e6d902ea66 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Sat, 8 Feb 2020 17:09:14 +0100 Subject: mb/pcengines/apu2: Use variable `len` holding same value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ia5916f191a7b1a846231b7e36924a16f3a658961 Signed-off-by: Paul Menzel Reviewed-on: https://review.coreboot.org/c/coreboot/+/38784 Tested-by: build bot (Jenkins) Reviewed-by: Michał Żygowski --- src/mainboard/pcengines/apu2/mainboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mainboard/pcengines/apu2') diff --git a/src/mainboard/pcengines/apu2/mainboard.c b/src/mainboard/pcengines/apu2/mainboard.c index a13ded959a..9bf58a78b9 100644 --- a/src/mainboard/pcengines/apu2/mainboard.c +++ b/src/mainboard/pcengines/apu2/mainboard.c @@ -169,7 +169,7 @@ static int mainboard_smbios_type16(DMI_INFO *agesa_dmi, int *handle, t = (struct smbios_type16 *)*current; len = sizeof(struct smbios_type16); - memset(t, 0, sizeof(struct smbios_type16)); + memset(t, 0, len); max_capacity = get_spd_offset() ? 4 : 2; /* 4GB or 2GB variant */ t->type = SMBIOS_PHYS_MEMORY_ARRAY; -- cgit v1.2.3