On 9 April 2015 at 16:54, Alex Bennée <alex.ben...@linaro.org> wrote:
>
> Shannon Zhao <zhaoshengl...@huawei.com> writes:
>
>> From: Shannon Zhao <shannon.z...@linaro.org>
>> +build_mcfg(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info)
>> +{
>> +    AcpiTableMcfg *mcfg;
>> +    acpi_pcie_info *info = guest_info->pcie_info;
>> +    int len = sizeof(*mcfg) + 1 * sizeof(mcfg->allocation[0]);
>
> Explicit bracketing around the maths please.

This doesn't seem to make much sense anyway:
if the addition was intended to take precedence
then we're adding 1 to a size-of-a-struct, which is
a bit weird. And if the multiplication was intended
to take precedence then it's doing a pointless multiply
by one. Please can you check that this is actually
calculating the right value?

thanks
-- PMM

Reply via email to