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

Re: [Xen-devel] [PATCH] Cleanup use of strlen() to check for empty string


  • To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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


 


Rackspace

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