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] Cleanup use of strlen() to check for empty strin

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH] Cleanup use of strlen() to check for empty string
From: Jacob Gorm Hansen <jacobg@xxxxxxx>
Date: Wed, 5 Oct 2005 12:45:03 +0200
Delivery-date: Wed, 05 Oct 2005 10:42:37 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=hUSo09R9YPbecNOZHVtxo1TyNKGddMUUlr3ATsWD9sJYN5MxrrdrikzxDSEoQv9xVNOK1BCCKqjM11MGxkwUdUA0eCKJcnPRJNk990teN0gpCUFISUMwVSZ4C6mcDK+F3jDR1/4bP1CZc3HUAHjyayW6H3T0civHo2XOOHZKIos=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <42a97eac7c151046dd7a943c30b7b973@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: <e08041f30510041550o26f63c32oded91ffedcb488e2@xxxxxxxxxxxxxx> <42a97eac7c151046dd7a943c30b7b973@xxxxxxxxxxxx>
Reply-to: Jacob Gorm Hansen <jacobg@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 10/5/05, Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> wrote:
>
> On 4 Oct 2005, at 23:50, Jacob Gorm Hansen wrote:
>
> > I came across checks for strlen(s)==0 a few places in drivers/xen.
> > Here is a patch to fix that.
>
> Isn't your patch exactly equivalent? None of that code is time critical
> enough that a call to strlen matters.

It's just gross (looping over the entire length of a string just to
see if the first char is empty) that's all. Apply if you will.

Jacob

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

<Prev in Thread] Current Thread [Next in Thread>