]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/common/polylib.c
q3map2: use safe_malloc0 when safe_malloc is followed by a memset to 0 with the same...
[xonotic/netradiant.git] / tools / quake3 / common / polylib.c
index bef8fbd4d917313a0880d335a58daf75e3744641..21afcbcc9b3d2e482c61775c4912c6857f4ac05c 100644 (file)
@@ -66,8 +66,7 @@ winding_t   *AllocWinding( int points ){
                }
        }
        s = sizeof( *w ) + ( points ? sizeof( w->p[0] ) * ( points - 1 ) : 0 );
-       w = safe_malloc( s );
-       memset( w, 0, s );
+       w = safe_malloc0( s );
        return w;
 }
 
@@ -94,8 +93,7 @@ winding_accu_t *AllocWindingAccu( int points ){
                }
        }
        s = sizeof( *w ) + ( points ? sizeof( w->p[0] ) * ( points - 1 ) : 0 );
-       w = safe_malloc( s );
-       memset( w, 0, s );
+       w = safe_malloc0( s );
        return w;
 }