Received: from eggs.gnu.org ([208.118.235.92]:41692) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TP7Ky-0003d6-8e for qemu-devel@nongnu.org; Fri, 19 Oct 2012 03:49:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TP7Kx-0005rQ-8V for qemu-devel@nongnu.org; Fri, 19 Oct 2012 03:49:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TP7Kw-0005qw-VU for qemu-devel@nongnu.org; Fri, 19 Oct 2012 03:49:43 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9J7nfQV026180 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 19 Oct 2012 03:49:42 -0400 From: Markus Armbruster References: <1349877786-23514-1-git-send-email-pbonzini@redhat.com> <1349877786-23514-14-git-send-email-pbonzini@redhat.com> <876269xh4b.fsf@blackfin.pond.sub.org> <507ED344.8070902@redhat.com> Date: Fri, 19 Oct 2012 09:49:39 +0200 In-Reply-To: <507ED344.8070902@redhat.com> (Paolo Bonzini's message of "Wed, 17 Oct 2012 17:48:20 +0200") Message-ID: <87k3umlx4c.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 13/25] vnc: add error propagation to vnc_display_open List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, lcapitulino@redhat.com Paolo Bonzini writes: > Il 17/10/2012 17:17, Markus Armbruster ha scritto: >>> > +fail: >>> > + if (!error_is_set(errp)) { >>> > + error_set(errp, QERR_VNC_SERVER_FAILED, display); >> How can we get here with no error set? >> >> 1. !vnc_display (first goto fail). > > This can be fixed up to give a separate error. > >> 2. unit_connect() or inet_listen() return failure, but don't set error. >> >> 3. unix_listen() or inet_listen() return failure, but don't set error. >> >> Can 2. or 3. happen? >> >> If yes, these functions suck. If no, let's fix up 1. to set a suitable >> error, and drop the uninformative generic error here. >> > > It can at this point in the series, but not at the end. Feel free to make the fix up at the end then. > I tried to split this one into many commits, but I wasn't sure it was > worth to make a mini-series out of one function. In retrospect > it was. Review of a long series is unrewarding when the patches are all perfect ;)