Mercurial > sdl-ios-xcode
diff src/video/SDL_yuv_sw.c @ 1920:8a162bfdc838
Convert SDL_malloc to SDL_calloc if appropriate, slightly faster on operating systems which map the zero page for memory allocations.
OpenGL renderer in progress
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 22 Jul 2006 08:33:18 +0000 |
parents | c121d94672cb |
children | a788656ca29a |
line wrap: on
line diff
--- a/src/video/SDL_yuv_sw.c Wed Jul 19 08:46:57 2006 +0000 +++ b/src/video/SDL_yuv_sw.c Sat Jul 22 08:33:18 2006 +0000 @@ -1054,12 +1054,11 @@ int i; int CR, CB; - swdata = (SDL_SW_YUVTexture *) SDL_malloc(sizeof(*swdata)); + swdata = (SDL_SW_YUVTexture *) SDL_calloc(1, sizeof(*swdata)); if (!swdata) { SDL_OutOfMemory(); return NULL; } - SDL_zerop(swdata); switch (texture->format) { case SDL_PixelFormat_YV12: