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/
Home Products Support Community News


Re: [Xen-devel] [PATCH] xenbackendd: clean variable in loop

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] xenbackendd: clean variable in loop
From: Roger Pau Monné <roger.pau@xxxxxxxxxxxxx>
Date: Fri, 15 Jul 2011 09:28:43 +0200
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 15 Jul 2011 00:29:21 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=JdzDX+xo//4lmXAoqghFCCBoN5/fTbAzDu3nDSwaWjo=; b=cQLgm8IJk9mGl+zrYZlazTaPBNM+8nMekvd6dMwatxqjKbmYTekWZkc/YJuOsrWcpV nqOBKcSmtNp/9EkHHnqzp+kNaXMUEh01wlfNCMokYoLSDvi+nGVVKU1TM6yDwrmAwVAx q/07ew0NXCZhjwDRJw7scZFsa00zmb4WWDdwM=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19999.10491.678871.72430@xxxxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <CAPLaKK5wnGZdicsHE6YfvqneRrNX7rr6GzuOBf5P+eYLvCznAw@xxxxxxxxxxxxxx> <19999.6942.613816.462844@xxxxxxxxxxxxxxxxxxxxxxxx> <CAPLaKK5v84crv8znr9wo0MBRtCceQrSFG0ok3Z0jr0p+t37OkA@xxxxxxxxxxxxxx> <19999.10491.678871.72430@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

Here is the modified patch.

2011/7/14 Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>:
> Roger Pau Monné writes ("Re: [Xen-devel] [PATCH] xenbackendd: clean variable 
> in loop"):
>> The problem is that console usually comes after vbd, and it executes
>> the block hotplug script with the console device (because 'type' is
>> still set from the previous loop), nothing bad happens, just wanted to
>> get rid of the error message. Since the variable is reused trough the
>> for loop, I think it's best to clean it at the start/end of the loop,
>> this makes the code easier to understand (for me). Where do you
>> exactly suggest to put the initialization?
> I would delete the initialisation (but not the whole declaration) from
> line 155 and add it near line 274.  If this produces a compiler
> warning about possible uninitialised use then we have missed
> something.
> Ian.

Attachment: patch-xenbackendd
Description: Binary data

Xen-devel mailing list