提交 b939eb89 编写于 作者: D Daniel P. Berrange 提交者: Gerd Hoffmann

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: NDaniel P. Berrange <berrange@redhat.com>
Reviewed-by: NDarren Kenny <darren.kenny@oracle.com>
Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20171218191228.31018-4-berrange@redhat.com
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 c53df961
......@@ -963,25 +963,30 @@ static int find_and_clear_dirty_height(VncState *vs,
static int vnc_update_client(VncState *vs, int has_dirty)
{
VncDisplay *vd = vs->vd;
VncJob *job;
int y;
int height, width;
int n = 0;
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->need_update) {
return 0;
}
if (vs->output.offset && !vs->audio_cap && !vs->force_update)
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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册