From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZX5sN-0004Vy-FZ for qemu-devel@nongnu.org; Wed, 02 Sep 2015 07:06:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZX5sK-0006no-4J for qemu-devel@nongnu.org; Wed, 02 Sep 2015 07:06:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33069) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZX5sJ-0006ni-VF for qemu-devel@nongnu.org; Wed, 02 Sep 2015 07:06:44 -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 (Postfix) with ESMTPS id 6DF328EA29 for ; Wed, 2 Sep 2015 11:06:43 +0000 (UTC) Date: Wed, 2 Sep 2015 12:06:39 +0100 From: "Daniel P. Berrange" Message-ID: <20150902110639.GC22094@redhat.com> References: <1440601524-30316-1-git-send-email-berrange@redhat.com> <1440601524-30316-10-git-send-email-berrange@redhat.com> <55E5BF5B.3040801@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <55E5BF5B.3040801@redhat.com> Subject: Re: [Qemu-devel] [PATCH v5 9/9] ui: convert VNC server to use QCryptoTLSSession Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Paolo Bonzini , qemu-devel@nongnu.org, Gerd Hoffmann On Tue, Sep 01, 2015 at 09:08:11AM -0600, Eric Blake wrote: > On 08/26/2015 09:05 AM, Daniel P. Berrange wrote: > > +++ b/ui/vnc.c > > > @@ -3301,13 +3303,12 @@ static QemuOptsList qemu_vnc_opts = { > > }; > > > > > > -static void > > +static int > > vnc_display_setup_auth(VncDisplay *vs, > > bool password, > > bool sasl, > > - bool tls, > > - bool x509, > > - bool websocket) > > + bool websocket, > > + Error **errp) > > { > > Adding a return value and an errp pointer? Can't callers just check > whether errp was set, and then you can leave this as returning void? If we leave this function void, then the caller is forced to use a local Error and error_propagate(), since it is forbidden to de-reference the Error ** it already has. So this means the caller can just do a plain < 0 check for failure which is shorter & simpler. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|