From 7988d2fe12ea319d294460be92ccfebd1bb3dd50 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Thu, 21 Mar 2019 11:19:13 +0100 Subject: [PATCH] dcc: Remove a redundant NULL pointer check in dcc_create_surface() dcc_create_surface() already returns immediately if dcc is NULL. Signed-off-by: Francois Gouget Acked-by: Frediano Ziglio --- server/dcc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/dcc.c b/server/dcc.c index ae7b4380..53d52531 100644 --- a/server/dcc.c +++ b/server/dcc.c @@ -303,8 +303,7 @@ void dcc_create_surface(DisplayChannelClient *dcc, int surface_id) flags = is_primary_surface(display, surface_id) ? SPICE_SURFACE_FLAGS_PRIMARY : 0; /* don't send redundant create surface commands to client */ - if (!dcc || - common_graphics_channel_get_during_target_migrate(COMMON_GRAPHICS_CHANNEL(display)) || + if (common_graphics_channel_get_during_target_migrate(COMMON_GRAPHICS_CHANNEL(display)) || dcc->priv->surface_client_created[surface_id]) { return; }