From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abRI5-00046p-Pn for qemu-devel@nongnu.org; Thu, 03 Mar 2016 06:19:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abRI4-00060c-UZ for qemu-devel@nongnu.org; Thu, 03 Mar 2016 06:19:33 -0500 References: <1456998223-12356-1-git-send-email-arei.gonglei@huawei.com> <1456998223-12356-4-git-send-email-arei.gonglei@huawei.com> From: Paolo Bonzini Message-ID: <56D81DC0.5030302@redhat.com> Date: Thu, 3 Mar 2016 12:19:28 +0100 MIME-Version: 1.0 In-Reply-To: <1456998223-12356-4-git-send-email-arei.gonglei@huawei.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/6] spice: fix coverity complains List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gonglei , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org On 03/03/2016 10:43, Gonglei wrote: > Remove the unnecessary NULL check. > > Signed-off-by: Gonglei > --- > 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 242ab5f..1ffbec1 100644 > --- a/ui/spice-display.c > +++ b/ui/spice-display.c > @@ -769,9 +769,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; > Reviewed-by: Paolo Bonzini