From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1CHJ-0005Io-V4 for qemu-devel@nongnu.org; Fri, 13 May 2016 08:33:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b1CH9-0006kl-Mt for qemu-devel@nongnu.org; Fri, 13 May 2016 08:33:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44057) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1CH9-0006ka-H5 for qemu-devel@nongnu.org; Fri, 13 May 2016 08:33:03 -0400 From: Gerd Hoffmann Date: Fri, 13 May 2016 14:32:55 +0200 Message-Id: <1463142777-13040-16-git-send-email-kraxel@redhat.com> In-Reply-To: <1463142777-13040-1-git-send-email-kraxel@redhat.com> References: <1463142777-13040-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL v2 15/17] spice: fix coverity complains List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gonglei , Gerd Hoffmann From: Gonglei Remove the unnecessary NULL check. Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini Message-id: 1463047028-123868-3-git-send-email-arei.gonglei@huawei.com Signed-off-by: Gerd Hoffmann --- ui/spice-display.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ui/spice-display.c b/ui/spice-display.c index 2a77a54..0553c5e 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -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; -- 1.8.3.1