[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/14] ui: remove unreachable code in vnc_update_clie
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 03/14] ui: remove unreachable code in vnc_update_client |
Date: |
Fri, 12 Jan 2018 13:58:43 +0100 |
From: "Daniel P. Berrange" <address@hidden>
A previous commit:
commit 5a8be0f73d6f60ff08746377eb09ca459f39deab
Author: Gerd Hoffmann <address@hidden>
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 <address@hidden>
Reviewed-by: Darren Kenny <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>
---
ui/vnc.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/ui/vnc.c b/ui/vnc.c
index d72a61bde3..29a7208475 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -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;
}
--
2.9.3
- [Qemu-devel] [PULL 00/14] Vnc 20180112 patches, Gerd Hoffmann, 2018/01/12
- [Qemu-devel] [PULL 03/14] ui: remove unreachable code in vnc_update_client,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 04/14] ui: remove redundant indentation in vnc_client_update, Gerd Hoffmann, 2018/01/12
- [Qemu-devel] [PULL 08/14] ui: correctly reset framebuffer update state after processing dirty regions, Gerd Hoffmann, 2018/01/12
- [Qemu-devel] [PULL 05/14] ui: avoid pointless VNC updates if framebuffer isn't dirty, Gerd Hoffmann, 2018/01/12
- [Qemu-devel] [PULL 07/14] ui: introduce enum to track VNC client framebuffer update request state, Gerd Hoffmann, 2018/01/12
- [Qemu-devel] [PULL 02/14] ui: remove 'sync' parameter from vnc_update_client, Gerd Hoffmann, 2018/01/12
- [Qemu-devel] [PULL 01/14] vnc: fix debug spelling, Gerd Hoffmann, 2018/01/12
- [Qemu-devel] [PULL 09/14] ui: refactor code for determining if an update should be sent to the client, Gerd Hoffmann, 2018/01/12
- [Qemu-devel] [PULL 13/14] ui: add trace events related to VNC client throttling, Gerd Hoffmann, 2018/01/12
- [Qemu-devel] [PULL 12/14] ui: place a hard cap on VNC server output buffer size, Gerd Hoffmann, 2018/01/12