From patchwork Tue Feb 21 21:39:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alon Levy X-Patchwork-Id: 142367 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 46173B6F62 for ; Wed, 22 Feb 2012 08:40:18 +1100 (EST) Received: from localhost ([::1]:56735 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzxRP-0008FA-2O for incoming@patchwork.ozlabs.org; Tue, 21 Feb 2012 16:40:07 -0500 Received: from eggs.gnu.org ([140.186.70.92]:59718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzxRA-00082t-J5 for qemu-devel@nongnu.org; Tue, 21 Feb 2012 16:39:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RzxR8-0005gD-6H for qemu-devel@nongnu.org; Tue, 21 Feb 2012 16:39:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzxR7-0005g3-Sz for qemu-devel@nongnu.org; Tue, 21 Feb 2012 16:39:50 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1LLdmZo004649 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 21 Feb 2012 16:39:48 -0500 Received: from garlic.redhat.com (vpn-200-36.tlv.redhat.com [10.35.200.36]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q1LLdc64001985; Tue, 21 Feb 2012 16:39:46 -0500 From: Alon Levy To: qemu-devel@nongnu.org, kraxel@redhat.com, spice-devel@freedesktop.org, yhalperi@redhat.com, elmarco@redhat.com Date: Tue, 21 Feb 2012 23:39:30 +0200 Message-Id: <1329860377-6284-3-git-send-email-alevy@redhat.com> In-Reply-To: <1329860377-6284-1-git-send-email-alevy@redhat.com> References: <1329860377-6284-1-git-send-email-alevy@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC v4 2/9] sdl: remove NULL check, g_malloc0 can't fail X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Alon Levy --- ui/sdl.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/ui/sdl.c b/ui/sdl.c index 6f8091c..f6f711c 100644 --- a/ui/sdl.c +++ b/ui/sdl.c @@ -167,10 +167,6 @@ static PixelFormat sdl_to_qemu_pixelformat(SDL_PixelFormat *sdl_pf) static DisplaySurface* sdl_create_displaysurface(int width, int height) { DisplaySurface *surface = (DisplaySurface*) g_malloc0(sizeof(DisplaySurface)); - if (surface == NULL) { - fprintf(stderr, "sdl_create_displaysurface: malloc failed\n"); - exit(1); - } surface->width = width; surface->height = height;