[qemu-xen master] ui: remove unreachable code in vnc_update_client

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[qemu-xen master] ui: remove unreachable code in vnc_update_client

patchbot
commit de1e7a91c8fdec1527f454e14384653789ba7f1a
Author:     Daniel P. Berrange <[hidden email]>
AuthorDate: Mon Dec 18 19:12:17 2017 +0000
Commit:     Michael Roth <[hidden email]>
CommitDate: Mon Feb 12 18:33:28 2018 -0600

    ui: remove unreachable code in vnc_update_client
   
    A previous commit:
   
      commit 5a8be0f73d6f60ff08746377eb09ca459f39deab
      Author: Gerd Hoffmann <[hidden email]>
      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 <[hidden email]>
    Reviewed-by: Darren Kenny <[hidden email]>
    Reviewed-by: Marc-André Lureau <[hidden email]>
    Message-id: [hidden email]
    Signed-off-by: Gerd Hoffmann <[hidden email]>
    (cherry picked from commit c53df961617736f94731d94b62c2954c261d2bae)
    Signed-off-by: Michael Roth <[hidden email]>
---
 ui/vnc.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/ui/vnc.c b/ui/vnc.c
index 7ba3297..869c75b 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;
 }
 
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#master


_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog