spice: fix coverity complains
authorGonglei <arei.gonglei@huawei.com>
Thu, 12 May 2016 09:57:08 +0000 (17:57 +0800)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 12 May 2016 14:41:46 +0000 (16:41 +0200)
Remove the unnecessary NULL check.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1463047028-123868-3-git-send-email-arei.gonglei@huawei.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/spice-display.c

index 2a77a54..0553c5e 100644 (file)
@@ -774,9 +774,7 @@ static void display_mouse_define(DisplayChangeListener *dcl,
     SimpleSpiceDisplay *ssd = container_of(dcl, SimpleSpiceDisplay, dcl);
 
     qemu_mutex_lock(&ssd->lock);
-    if (c) {
-        cursor_get(c);
-    }
+    cursor_get(c);
     cursor_put(ssd->cursor);
     ssd->cursor = c;
     ssd->hot_x = c->hot_x;