From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOVrI-000742-FU for qemu-devel@nongnu.org; Wed, 17 Oct 2012 11:48:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOVr6-0007Th-FK for qemu-devel@nongnu.org; Wed, 17 Oct 2012 11:48:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41311) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOVr6-0007Tb-6t for qemu-devel@nongnu.org; Wed, 17 Oct 2012 11:48:24 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9HFmNfl000898 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 17 Oct 2012 11:48:23 -0400 Message-ID: <507ED344.8070902@redhat.com> Date: Wed, 17 Oct 2012 17:48:20 +0200 From: Paolo Bonzini MIME-Version: 1.0 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> In-Reply-To: <876269xh4b.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit 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: Markus Armbruster Cc: qemu-devel@nongnu.org, lcapitulino@redhat.com 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. 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. Paolo