From aa10a08696cae93799fcddae3f0245ceee905e01 Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 6 Sep 2012 08:48:23 +0200 Subject: xserver mesa git update 6 sep 2012 --- mesalib/src/mesa/swrast/s_context.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'mesalib/src/mesa/swrast/s_context.c') diff --git a/mesalib/src/mesa/swrast/s_context.c b/mesalib/src/mesa/swrast/s_context.c index 53497bc9c..31a12dade 100644 --- a/mesalib/src/mesa/swrast/s_context.c +++ b/mesalib/src/mesa/swrast/s_context.c @@ -720,7 +720,7 @@ GLboolean _swrast_CreateContext( struct gl_context *ctx ) { GLuint i; - SWcontext *swrast = (SWcontext *) calloc(1, sizeof(SWcontext)); + SWcontext *swrast = calloc(1, sizeof(SWcontext)); #ifdef _OPENMP const GLuint maxThreads = omp_get_max_threads(); #else @@ -775,7 +775,7 @@ _swrast_CreateContext( struct gl_context *ctx ) * using multiple threads, it is necessary to have one SpanArrays instance * per thread. */ - swrast->SpanArrays = (SWspanarrays *) malloc(maxThreads * sizeof(SWspanarrays)); + swrast->SpanArrays = malloc(maxThreads * sizeof(SWspanarrays)); if (!swrast->SpanArrays) { free(swrast); return GL_FALSE; @@ -803,10 +803,10 @@ _swrast_CreateContext( struct gl_context *ctx ) ctx->swrast_context = swrast; - swrast->stencil_temp.buf1 = (GLubyte *) malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); - swrast->stencil_temp.buf2 = (GLubyte *) malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); - swrast->stencil_temp.buf3 = (GLubyte *) malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); - swrast->stencil_temp.buf4 = (GLubyte *) malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); + swrast->stencil_temp.buf1 = malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); + swrast->stencil_temp.buf2 = malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); + swrast->stencil_temp.buf3 = malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); + swrast->stencil_temp.buf4 = malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); if (!swrast->stencil_temp.buf1 || !swrast->stencil_temp.buf2 || @@ -829,8 +829,7 @@ _swrast_DestroyContext( struct gl_context *ctx ) } free( swrast->SpanArrays ); - if (swrast->ZoomedArrays) - free( swrast->ZoomedArrays ); + free( swrast->ZoomedArrays ); free( swrast->TexelBuffer ); free(swrast->stencil_temp.buf1); -- cgit v1.2.3