mirror of
https://github.com/qemu/qemu.git
synced 2025-08-09 10:25:06 +00:00
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)
|
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;
|
VncDisplay *vd = vs->vd;
|
||||||
VncJob *job;
|
VncJob *job;
|
||||||
int y;
|
int y;
|
||||||
int height, width;
|
int height, width;
|
||||||
int n = 0;
|
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 */
|
/* kernel send buffers are full -> drop frames to throttle */
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!vs->has_dirty && !vs->audio_cap && !vs->force_update)
|
if (!vs->has_dirty && !vs->audio_cap && !vs->force_update) {
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Send screen updates to the vnc client using the server
|
* Send screen updates to the vnc client using the server
|
||||||
@ -1030,9 +1035,6 @@ static int vnc_update_client(VncState *vs, int has_dirty)
|
|||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* audio */
|
/* audio */
|
||||||
static void audio_capture_notify(void *opaque, audcnotification_e cmd)
|
static void audio_capture_notify(void *opaque, audcnotification_e cmd)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user