mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 14:41:25 +00:00
replay: Remove some goto statement
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Snir Sheriber <ssheribe@redhat.com>
This commit is contained in:
parent
32ee52df16
commit
3af64b61dc
@ -116,7 +116,7 @@ static gboolean fill_queue_idle(gpointer user_data)
|
||||
if (!cmd) {
|
||||
g_async_queue_push(display_queue, GINT_TO_POINTER(-1));
|
||||
g_async_queue_push(cursor_queue, GINT_TO_POINTER(-1));
|
||||
goto end;
|
||||
break;
|
||||
}
|
||||
|
||||
++ncommands;
|
||||
@ -133,7 +133,6 @@ static gboolean fill_queue_idle(gpointer user_data)
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
if (!keep) {
|
||||
pthread_mutex_lock(&mutex);
|
||||
if (fill_source) {
|
||||
@ -153,17 +152,12 @@ static void fill_queue(void)
|
||||
{
|
||||
pthread_mutex_lock(&mutex);
|
||||
|
||||
if (!started)
|
||||
goto end;
|
||||
if (started && fill_source == NULL) {
|
||||
fill_source = g_idle_source_new();
|
||||
g_source_set_callback(fill_source, fill_queue_idle, NULL, NULL);
|
||||
g_source_attach(fill_source, basic_event_loop_get_context());
|
||||
}
|
||||
|
||||
if (fill_source)
|
||||
goto end;
|
||||
|
||||
fill_source = g_idle_source_new();
|
||||
g_source_set_callback(fill_source, fill_queue_idle, NULL, NULL);
|
||||
g_source_attach(fill_source, basic_event_loop_get_context());
|
||||
|
||||
end:
|
||||
pthread_mutex_unlock(&mutex);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user