mirror of https://github.com/xqemu/xqemu.git
ui: remove redundant indentation in vnc_client_update
Now that previous dead / unreachable code has been removed, we can simplify the indentation in the vnc_client_update method. 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-4-berrange@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
c53df96161
commit
b939eb89b6
26
ui/vnc.c
26
ui/vnc.c
|
@ -963,25 +963,30 @@ static int find_and_clear_dirty_height(VncState *vs,
|
|||
|
||||
static int vnc_update_client(VncState *vs, int has_dirty)
|
||||
{
|
||||
if (vs->disconnecting) {
|
||||
vnc_disconnect_finish(vs);
|
||||
return 0;
|
||||
}
|
||||
|
||||
vs->has_dirty += has_dirty;
|
||||
if (vs->need_update) {
|
||||
VncDisplay *vd = vs->vd;
|
||||
VncJob *job;
|
||||
int y;
|
||||
int height, width;
|
||||
int n = 0;
|
||||
|
||||
if (vs->output.offset && !vs->audio_cap && !vs->force_update)
|
||||
if (vs->disconnecting) {
|
||||
vnc_disconnect_finish(vs);
|
||||
return 0;
|
||||
}
|
||||
|
||||
vs->has_dirty += has_dirty;
|
||||
if (!vs->need_update) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (vs->output.offset && !vs->audio_cap && !vs->force_update) {
|
||||
/* kernel send buffers are full -> drop frames to throttle */
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!vs->has_dirty && !vs->audio_cap && !vs->force_update)
|
||||
if (!vs->has_dirty && !vs->audio_cap && !vs->force_update) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Send screen updates to the vnc client using the server
|
||||
|
@ -1028,9 +1033,6 @@ static int vnc_update_client(VncState *vs, int has_dirty)
|
|||
vs->force_update = 0;
|
||||
vs->has_dirty = 0;
|
||||
return n;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* audio */
|
||||
|
|
Loading…
Reference in New Issue