From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: Re: [PATCH v3 17/28] tools/libxl: Infrastructure for reading a libxl migration v2 stream Date: Mon, 13 Jul 2015 16:35:45 +0100 Message-ID: <21923.56017.942415.505120@mariner.uk.xensource.com> References: <1436788907-1921-1-git-send-email-andrew.cooper3@citrix.com> <1436788907-1921-18-git-send-email-andrew.cooper3@citrix.com> <21923.54363.294360.591599@mariner.uk.xensource.com> <55A3D5A4.2010204@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55A3D5A4.2010204@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: Andrew Cooper Cc: Ross Lagerwall , Wei Liu , Ian Campbell , Xen-devel List-Id: xen-devel@lists.xenproject.org Andrew Cooper writes ("Re: [PATCH v3 17/28] tools/libxl: Infrastructure for reading a libxl migration v2 stream"): > On 13/07/15 16:08, Ian Jackson wrote: > > This means that the carefd functions bracketing open are easy to see > > and there is no entanglement with error-handling flow control. > > libxl__carefd_opened() doesn't tolerate being handed -1. It cannot be > used ahead of the error check. Wait, what ? (reads) The doc comment says: /* Combines _record and _unlock in a single call. If fd==-1, * still does the unlock, but returns 0. Cannot fail. */ _hidden libxl__carefd *libxl__carefd_opened(libxl_ctx *ctx, int fd); but the implementation agrees with you. Under the circumstances I am going to drop this request from this review and treat this as a cleanup activity. Sorry. Ian.