Paolo Bonzini <pbonz...@redhat.com> writes: > Avoid the dance between csock and vs->lsock. > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > --- > console.h | 2 +- > qmp.c | 6 ++---- > ui/vnc.c | 20 +++++++++----------- > 3 file modificati, 12 inserzioni(+), 16 rimozioni(-) > > diff --git a/console.h b/console.h > index f990684..6099d8d 100644 > --- a/console.h > +++ b/console.h > @@ -378,7 +378,7 @@ void cocoa_display_init(DisplayState *ds, int > full_screen); > /* vnc.c */ > void vnc_display_init(DisplayState *ds); > void vnc_display_close(DisplayState *ds); > -int vnc_display_open(DisplayState *ds, const char *display); > +void vnc_display_open(DisplayState *ds, const char *display, Error **errp); > void vnc_display_add_client(DisplayState *ds, int csock, int skipauth); > int vnc_display_disable_login(DisplayState *ds); > char *vnc_display_local_addr(DisplayState *ds); > diff --git a/qmp.c b/qmp.c > index 36c54c5..31bc3bf 100644 > --- a/qmp.c > +++ b/qmp.c > @@ -349,11 +349,9 @@ void qmp_change_vnc_password(const char *password, Error > **errp) > } > } > > -static void qmp_change_vnc_listen(const char *target, Error **err) > +static void qmp_change_vnc_listen(const char *target, Error **errp) > { > - if (vnc_display_open(NULL, target) < 0) { > - error_set(err, QERR_VNC_SERVER_FAILED, target); > - } > + vnc_display_open(NULL, target, errp); > } >
These two hunks looks out of place, and don't compile: ui/vnc.c:2851:5: error: conflicting types for ‘vnc_display_open’ vl.c:3710:9: error: too few arguments to function ‘vnc_display_open’ Did they creep into the wrong patch? [...]