aboutsummaryrefslogtreecommitdiff
path: root/ui/vnc.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-10-18 09:06:21 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-10-23 13:54:56 +0200
commitc1c1619c8b100f675bc97198218f3fcb0a740921 (patch)
tree41540d29a6771fab699de572f77d5c1e08d582de /ui/vnc.c
parent90119816e36ba019650214e7efeccdac1d4a9e32 (diff)
downloadqemu-c1c1619c8b100f675bc97198218f3fcb0a740921.zip
qemu-c1c1619c8b100f675bc97198218f3fcb0a740921.tar.gz
qemu-c1c1619c8b100f675bc97198218f3fcb0a740921.tar.bz2
vnc: avoid Yoda conditionals
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'ui/vnc.c')
-rw-r--r--ui/vnc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/vnc.c b/ui/vnc.c
index ceade57..64c4092 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3068,7 +3068,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;
@@ -3090,7 +3090,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 {