qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] bitops.h: Add field32() and field64() functi


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH v2] bitops.h: Add field32() and field64() functions to extract bitfields
Date: Wed, 27 Jun 2012 17:37:46 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0

On 06/27/2012 05:24 PM, Markus Armbruster wrote:
> Avi Kivity <address@hidden> writes:
> 
>> On 06/27/2012 04:28 PM, Eric Blake wrote:
> [...]
>>> You marked this function signature as returning uint64_t, but didn't
>>> return anything.  I think the logical return is the new contents of
>>> *pvalue.  Another logical choice would be marking the function void.
>>> 
>>
>> Void makes more sense here as you usually want in-place update.
> 
> It's an assignment, so I'd follow the precedence of C's assignment
> operator and return the new value of the left hand side.

Yup.

-- 
error compiling committee.c: too many arguments to function





reply via email to

[Prev in Thread] Current Thread [Next in Thread]