summaryrefslogtreecommitdiff
path: root/src/mainboard/pcengines
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/pcengines')
-rw-r--r--src/mainboard/pcengines/apu1/mainboard.c6
-rw-r--r--src/mainboard/pcengines/apu2/mainboard.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/mainboard/pcengines/apu1/mainboard.c b/src/mainboard/pcengines/apu1/mainboard.c
index cb5d4fba8d..05c496dc57 100644
--- a/src/mainboard/pcengines/apu1/mainboard.c
+++ b/src/mainboard/pcengines/apu1/mainboard.c
@@ -173,7 +173,7 @@ static int mainboard_smbios_type16(DMI_INFO *agesa_dmi, int *handle, unsigned lo
int len;
t = (struct smbios_type16 *)*current;
- len = sizeof(struct smbios_type16);
+ len = sizeof(*t);
memset(t, 0, len);
max_capacity = get_spd_offset() ? 4 : 2; /* 4GB or 2GB variant */
@@ -199,10 +199,10 @@ static int mainboard_smbios_type17(DMI_INFO *agesa_dmi, int *handle, unsigned lo
int len;
t = (struct smbios_type17 *)*current;
- memset(t, 0, sizeof(struct smbios_type17));
+ memset(t, 0, sizeof(*t));
t->type = SMBIOS_MEMORY_DEVICE;
- t->length = sizeof(struct smbios_type17) - 2;
+ t->length = sizeof(*t) - 2;
t->handle = *handle + 1;
t->phys_memory_array_handle = *handle;
t->memory_error_information_handle = 0xfffe;
diff --git a/src/mainboard/pcengines/apu2/mainboard.c b/src/mainboard/pcengines/apu2/mainboard.c
index 56976e53c5..bcf2536237 100644
--- a/src/mainboard/pcengines/apu2/mainboard.c
+++ b/src/mainboard/pcengines/apu2/mainboard.c
@@ -155,7 +155,7 @@ static int mainboard_smbios_type16(DMI_INFO *agesa_dmi, int *handle,
int len = 0;
t = (struct smbios_type16 *)*current;
- len = sizeof(struct smbios_type16);
+ len = sizeof(*t);
memset(t, 0, len);
max_capacity = get_spd_offset() ? 4 : 2; /* 4GB or 2GB variant */
@@ -182,10 +182,10 @@ static int mainboard_smbios_type17(DMI_INFO *agesa_dmi, int *handle,
int len;
t = (struct smbios_type17 *)*current;
- memset(t, 0, sizeof(struct smbios_type17));
+ memset(t, 0, sizeof(*t));
t->type = SMBIOS_MEMORY_DEVICE;
- t->length = sizeof(struct smbios_type17) - 2;
+ t->length = sizeof(*t) - 2;
t->handle = *handle + 1;
t->phys_memory_array_handle = *handle;
t->memory_error_information_handle = 0xfffe;