dcavalca / rpms / qemu

Forked from rpms/qemu a year ago
Clone

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

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