peterdelevoryas / rpms / qemu

Forked from rpms/qemu 2 years ago
Clone

Blame 0413-sdl-remove-NULL-check-g_malloc0-can-t-fail.patch

56753f
From 4888e60d646b0f8cdfe4180bacc90857d3d2a5dd Mon Sep 17 00:00:00 2001
56753f
From: Alon Levy <alevy@redhat.com>
56753f
Date: Fri, 24 Feb 2012 23:19:26 +0200
56753f
Subject: [PATCH 413/434] sdl: remove NULL check, g_malloc0 can't fail
56753f
56753f
Signed-off-by: Alon Levy <alevy@redhat.com>
56753f
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
56753f
---
56753f
 ui/sdl.c |    4 ----
56753f
 1 file changed, 4 deletions(-)
56753f
56753f
diff --git a/ui/sdl.c b/ui/sdl.c
56753f
index 8cafc44..6844c83 100644
56753f
--- a/ui/sdl.c
56753f
+++ b/ui/sdl.c
56753f
@@ -167,10 +167,6 @@ static PixelFormat sdl_to_qemu_pixelformat(SDL_PixelFormat *sdl_pf)
56753f
 static DisplaySurface* sdl_create_displaysurface(int width, int height)
56753f
 {
56753f
     DisplaySurface *surface = (DisplaySurface*) g_malloc0(sizeof(DisplaySurface));
56753f
-    if (surface == NULL) {
56753f
-        fprintf(stderr, "sdl_create_displaysurface: malloc failed\n");
56753f
-        exit(1);
56753f
-    }
56753f
 
56753f
     surface->width = width;
56753f
     surface->height = height;
56753f
-- 
56753f
1.7.10
56753f