]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/bsp.c
q3map2: use safe_malloc0 when safe_malloc is followed by a memset to 0 with the same...
[xonotic/netradiant.git] / tools / quake3 / q3map2 / bsp.c
index b3c28002aaf5c91c4df3e6d41142d7a08d4a22ed..432de5d538af48580903a12e7d253380b1584958 100644 (file)
@@ -719,8 +719,7 @@ int BSPMain( int argc, char **argv ){
        Sys_Printf( "--- BSP ---\n" );
 
        SetDrawSurfacesBuffer();
-       mapDrawSurfs = safe_malloc( sizeof( mapDrawSurface_t ) * MAX_MAP_DRAW_SURFS );
-       memset( mapDrawSurfs, 0, sizeof( mapDrawSurface_t ) * MAX_MAP_DRAW_SURFS );
+       mapDrawSurfs = safe_malloc0( sizeof( mapDrawSurface_t ) * MAX_MAP_DRAW_SURFS );
        numMapDrawSurfs = 0;
 
        tempSource[ 0 ] = '\0';