Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- ui/vnc.c | 4 ++-- 1 file modificato, 2 inserzioni(+), 2 rimozioni(-)
diff --git a/ui/vnc.c b/ui/vnc.c index b893e07..2892fb7 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3066,7 +3066,7 @@ int vnc_display_open(DisplayState *ds, const char *display) vs->lsock = unix_connect(display+5, NULL); else vs->lsock = inet_connect(display, NULL); - if (-1 == vs->lsock) { + if (vs->lsock < 0) { g_free(vs->display); vs->display = NULL; return -1; @@ -3088,7 +3088,7 @@ int vnc_display_open(DisplayState *ds, const char *display) vs->lsock = inet_listen(display, dpy, 256, SOCK_STREAM, 5900, NULL); } - if (-1 == vs->lsock) { + if (vs->lsock < 0) { g_free(dpy); return -1; } else { -- 1.7.12.1