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 :|