ui: remove unreachable code in vnc_update_client

A previous commit:

  commit 5a8be0f73d
  Author: Gerd Hoffmann <kraxel@redhat.com>
  Date:   Wed Jul 13 12:21:20 2016 +0200

    vnc: make sure we finish disconnect

Added a check for vs->disconnecting at the very start of the
vnc_update_client method. This means that the very next "if"
statement check for !vs->disconnecting always evaluates true,
and is thus redundant. This in turn means the vs->disconnecting
check at the very end of the method never evaluates true, and
is thus unreachable code.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20171218191228.31018-3-berrange@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit c53df96161)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
stable-2.11
Daniel P. Berrange 2017-12-18 19:12:17 +00:00 committed by Michael Roth
parent 0181686a98
commit de1e7a91c8
1 changed files with 1 additions and 5 deletions

View File

@ -969,7 +969,7 @@ static int vnc_update_client(VncState *vs, int has_dirty)
}
vs->has_dirty += has_dirty;
if (vs->need_update && !vs->disconnecting) {
if (vs->need_update) {
VncDisplay *vd = vs->vd;
VncJob *job;
int y;
@ -1030,10 +1030,6 @@ static int vnc_update_client(VncState *vs, int has_dirty)
return n;
}
if (vs->disconnecting) {
vnc_disconnect_finish(vs);
}
return 0;
}