comparison src/video/x11/SDL_x11video.c @ 4266:62849663f20a SDL-1.2

Removed duplicate memset() calls.
author Ryan C. Gordon <icculus@icculus.org>
date Tue, 29 Sep 2009 13:40:34 +0000
parents b0c979816d67
children d48035d857d3
comparison
equal deleted inserted replaced
4265:c7b1d5eaa77d 4266:62849663f20a
107 device = (SDL_VideoDevice *)SDL_malloc(sizeof(SDL_VideoDevice)); 107 device = (SDL_VideoDevice *)SDL_malloc(sizeof(SDL_VideoDevice));
108 if ( device ) { 108 if ( device ) {
109 SDL_memset(device, 0, (sizeof *device)); 109 SDL_memset(device, 0, (sizeof *device));
110 device->hidden = (struct SDL_PrivateVideoData *) 110 device->hidden = (struct SDL_PrivateVideoData *)
111 SDL_malloc((sizeof *device->hidden)); 111 SDL_malloc((sizeof *device->hidden));
112 SDL_memset(device->hidden, 0, (sizeof *device->hidden));
113 device->gl_data = (struct SDL_PrivateGLData *) 112 device->gl_data = (struct SDL_PrivateGLData *)
114 SDL_malloc((sizeof *device->gl_data)); 113 SDL_malloc((sizeof *device->gl_data));
115 SDL_memset(device->gl_data, 0, (sizeof *device->gl_data));
116 } 114 }
117 if ( (device == NULL) || (device->hidden == NULL) || 115 if ( (device == NULL) || (device->hidden == NULL) ||
118 (device->gl_data == NULL) ) { 116 (device->gl_data == NULL) ) {
119 SDL_OutOfMemory(); 117 SDL_OutOfMemory();
120 X11_DeleteDevice(device); /* calls SDL_X11_UnloadSymbols(). */ 118 X11_DeleteDevice(device); /* calls SDL_X11_UnloadSymbols(). */