"Michael S. Tsirkin" <m...@redhat.com> writes:

> On Wed, Oct 20, 2010 at 05:18:57PM +0900, Isaku Yamahata wrote:
>> This patch implements helper functions for pcie aer capability
>> which will be used later.
>> 
>> Signed-off-by: Isaku Yamahata <yamah...@valinux.co.jp>
>
> Some style comments and a couple of minor bugs.
[...]
>> +
>> +static int aer_log_add_err(PCIEAERLog *aer_log, const PCIEAERErr *err)
>> +{
>> +    uint32_t i;
>> +    if (aer_log_full(aer_log)) {
>> +        return -1;
>> +    }
>> +    i = aer_log_add(aer_log);
>> +    memcpy(&aer_log->log[i], err, sizeof(*err));
>
> sizeof is not a function, you don't need ()

Matter of taste.  Yes, it's an operator, but it's as function-like as
operators get.

For what it's worth, grep says roughly 98% of our sizeof uses are
followed by '('.  I doubt the parenthesis are required for grouping that
often.

[...]

Reply via email to