From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH for-4.6 03/13] xl/libxl: remove a bunch of pointless assignments Date: Thu, 23 Jul 2015 10:25:57 +0100 Message-ID: <1437643557.19412.67.camel@citrix.com> References: <1437638354-14216-1-git-send-email-wei.liu2@citrix.com> <1437638354-14216-4-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZIClP-0006bx-C1 for xen-devel@lists.xenproject.org; Thu, 23 Jul 2015 09:26:03 +0000 In-Reply-To: <1437638354-14216-4-git-send-email-wei.liu2@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu , Xen-devel Cc: Ian Jackson List-Id: xen-devel@lists.xenproject.org On Thu, 2015-07-23 at 08:59 +0100, Wei Liu wrote: > Those values are overwritten before they can be of any use. I commented on a similar patch recently (having acked it): The flip side is that if the code uses the "init everything and goto out on error" idiom then the init might need to be put back if the code changes, hopefully even a regular compiler would spot this though. The rc = ERROR_FAIL one is consistent with coding style. coding style does say that things which might need cleaning up should be initialised as they are declared, however I don't think any of the pid/ret's here need cleanup. So: Acked-by: Ian Campbell