From: Ian Jackson Subject: Re: [PATCH v4 20/29] tools/libxl: Convert a legacy stream if needed Date: Tue, 14 Jul 2015 14:37:57 +0100 Message-ID: <21925.4277.665558.370761@mariner.uk.xensource.com> References: <1436871584-6522-1-git-send-email-andrew.cooper3@citrix.com> <1436871584-6522-21-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1436871584-6522-21-git-send-email-andrew.cooper3@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: Wei Liu , Ian Campbell , Xen-devel List-Id: xen-devel@lists.xenproject.org Andrew Cooper writes ("[PATCH v4 20/29] tools/libxl: Convert a legacy stream if needed"): > For backwards compatibility, a legacy stream needs converting before > it can be read by the v2 stream logic. > > This causes the v2 stream logic to need to juggle two parallel tasks. > check_all_finished() is introduced for the purpose of joining the > tasks in both success and error cases. > > Signed-off-by: Andrew Cooper Acked-by: Ian Jackson > + /* If we started a conversion helper, we took ownership of its carefd. */ > + if (stream->chs.v2_carefd) > + libxl__carefd_close(stream->chs.v2_carefd); I have just spotted that this if is not needed because libxl__carefd_close(NULL) is a no-op (and I have just checked that the implementation matches the documentation!) If you need to respin for some other reason you might want to adjust this, but I won't mind if you don't. Otherwise, you or I might want to propose a cleanup patch for this later. Note that this is not the only occurrence. Thanks, Ian.