WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 0/4] [Net] Support accelerated network plugin mod

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 0/4] [Net] Support accelerated network plugin modules
From: Michael Buesch <mb@xxxxxxxxx>
Date: Fri, 15 Jun 2007 14:21:01 +0200
Cc: netdev@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, herbert@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 19 Jun 2007 08:51:49 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C29842A2.9328%Keir.Fraser@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C29842A2.9328%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6
On Friday 15 June 2007 14:20:34 Keir Fraser wrote:
> 
> On 15/6/07 13:11, "Michael Buesch" <mb@xxxxxxxxx> wrote:
> 
> >> No use of the following please:
> >> If (foo) return 1; else return 0;
> >> Is clearer as:
> >> Return foo;
> > 
> > But it's not the same.
> > return !!foo;
> > would be the same. And yes, it does matter:
> 
> True in general, but not the cases I've seen in this patchset, where 'foo'
> is a predicate.

Ok, if foo is a variable containing an error code, it's
better to return that error code. I assumed that foo is a
variable containing some value (counter or something).

-- 
Greetings Michael.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel