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

Re: [Xen-devel] [PATCH v8 1/2] hypervisor: XENMEM_claim_pages (subop of existing) hypercall

>>> On 28.11.12 at 19:05, Dan Magenheimer <dan.magenheimer@xxxxxxxxxx> wrote:
>>  From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
>> Perhaps then even invert the if()
>> condition and have just a single return point.
> Rather than invert the if(), unless you prefer the extra
> level of indentation, I'd prefer:
> +    d->tot_pages += pages;
> +    if ( !d->unclaimed_pages )
> +        goto out;
>    <snip>
> +out:
> +    return d->tot_pages;
> Would that be acceptable?

Acceptable as per the coding guidelines - yes. But I personally
dislike goto-s (and would hence prefer the extra level of
indentation, considering that this is a strait code block with no
deep nesting of inner scopes).


Xen-devel mailing list



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