From: Ian Jackson Subject: Re: [PATCH v3 5/5] mkelf32: Close those file descriptors in the error paths. Date: Fri, 19 Feb 2016 11:42:28 +0000 Message-ID: <22214.65444.685423.714793@mariner.uk.xensource.com> References: <1455246507-5589-1-git-send-email-konrad.wilk@oracle.com> <1455246507-5589-6-git-send-email-konrad.wilk@oracle.com> <56C5FF6102000078000D3C6B@prv-mh.provo.novell.com> <22213.62372.815878.584227@mariner.uk.xensource.com> <56C6033A02000078000D3CAC@prv-mh.provo.novell.com> <20160218211234.GB28661@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aWjST-0000Xw-Sq for xen-devel@lists.xenproject.org; Fri, 19 Feb 2016 11:42:49 +0000 In-Reply-To: <20160218211234.GB28661@localhost.localdomain> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: xen-devel@lists.xenproject.org, ian.campbell@citrix.com, Jan Beulich List-Id: xen-devel@lists.xenproject.org Konrad Rzeszutek Wilk writes ("Re: [PATCH v3 5/5] mkelf32: Close those file descriptors in the error paths."): > > > If I turned them in: > > if (..blah..) > { > close(infd); > return -1; > } > > would that satisfy you? I would strongly resist that. That coding style is an error handling antipattern. Ian.