mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-31 11:28:31 +00:00
worker: Remove display_is_connected()
It's only called once, and when it's called, we will have dereferenced worker->display_channel a few lines before in display_channel_set_monitors_config_to_primary(), so this cannot be NULL. The 'if (worker->display_channel)' check can thus be removed, so display_is_connected() becomes just red_channel_is_connected(). Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
ca8ffdb8ef
commit
612c94c61b
@ -93,12 +93,6 @@ struct RedWorker {
|
||||
GMainLoop *loop;
|
||||
};
|
||||
|
||||
static int display_is_connected(RedWorker *worker)
|
||||
{
|
||||
return worker->display_channel &&
|
||||
red_channel_is_connected(RED_CHANNEL(worker->display_channel));
|
||||
}
|
||||
|
||||
void red_drawable_unref(RedDrawable *red_drawable)
|
||||
{
|
||||
if (--red_drawable->refs) {
|
||||
@ -529,7 +523,7 @@ static void dev_create_primary_surface(RedWorker *worker, uint32_t surface_id,
|
||||
|
||||
CommonGraphicsChannel *common = COMMON_GRAPHICS_CHANNEL(display);
|
||||
RedChannel *channel = RED_CHANNEL(display);
|
||||
if (display_is_connected(worker) &&
|
||||
if (red_channel_is_connected(channel) &&
|
||||
!common_graphics_channel_get_during_target_migrate(common)) {
|
||||
/* guest created primary, so it will (hopefully) send a monitors_config
|
||||
* now, don't send our own temporary one */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user