mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 19:49:43 +00:00
sdl: remove NULL check, g_malloc0 can't fail
Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
bb5a8cd5b0
commit
63ea491d4e
4
ui/sdl.c
4
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;
|
||||
|
Loading…
Reference in New Issue
Block a user