Skip to content

Commit

Permalink
vnc: remove dead code
Browse files Browse the repository at this point in the history
If vs->ws_enabled is set ws_display is non-NULL.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
  • Loading branch information
kraxel committed Mar 12, 2015
1 parent bf7aa45 commit fc5c3ff
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions ui/vnc.c
Expand Up @@ -3627,13 +3627,8 @@ void vnc_display_open(const char *id, Error **errp)
}
#ifdef CONFIG_VNC_WS
if (vs->ws_enabled) {
if (ws_display) {
vs->lwebsock = inet_listen(ws_display, NULL, 0,
SOCK_STREAM, 0, errp);
} else {
vs->lwebsock = inet_listen(display, NULL, 0,
SOCK_STREAM, 5700, errp);
}
vs->lwebsock = inet_listen(ws_display, NULL, 0,
SOCK_STREAM, 0, errp);
if (vs->lwebsock < 0) {
if (vs->lsock) {
close(vs->lsock);
Expand Down

0 comments on commit fc5c3ff

Please sign in to comment.