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

Re: [Xen-devel] [PATCH] sysctl: adjust XEN_SYSCTL_numainfo behavior



On 14/07/15 13:35, Dario Faggioli wrote:
> On Tue, 2015-07-14 at 10:52 +0100, Jan Beulich wrote:
>> ... to match XEN_SYSCTL_cputopoinfo, allowing the caller to get what it
>> needs (if e.g. it's after the data for just one specific node) with
>> just one hypercall, without caring about the total number of nodes in
>> the system.
>>
>> Suggested-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>>
> Reviewed-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
>
> One question:
>
>> --- a/xen/common/sysctl.c
>> +++ b/xen/common/sysctl.c
>>  
>> @@ -335,7 +329,7 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xe
>>          else
>>              i = num_nodes;
>>  
>> -        if ( (!ret || (ret == -ENOBUFS)) && (ni->num_nodes != i) )
>> +        if ( !ret && (ni->num_nodes != i) )
>>          {
> Can't we kill the parentheses around the second argument of the && ?

No.  The coding style requires binary operators as part of larger
statements to have brackets.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.