vnc: remove dead code

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>
This commit is contained in:
Gerd Hoffmann 2015-02-19 11:03:17 +01:00
parent bf7aa45e7b
commit fc5c3ff751

View File

@ -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);