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/state_tracker/st_cb_texture.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'mesalib/src/mesa/state_tracker/st_cb_texture.c') diff --git a/mesalib/src/mesa/state_tracker/st_cb_texture.c b/mesalib/src/mesa/state_tracker/st_cb_texture.c index ed3bbc725..518b680f0 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_texture.c +++ b/mesalib/src/mesa/state_tracker/st_cb_texture.c @@ -648,7 +648,7 @@ decompress_with_blit(struct gl_context * ctx, enum pipe_format pformat = util_format_linear(dst_texture->format); GLfloat *rgba; - rgba = (GLfloat *) malloc(width * 4 * sizeof(GLfloat)); + rgba = malloc(width * 4 * sizeof(GLfloat)); if (!rgba) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetTexImage()"); goto end; @@ -775,7 +775,7 @@ fallback_copy_texsubimage(struct gl_context *ctx, yStep = 1; } - data = (uint *) malloc(width * sizeof(uint)); + data = malloc(width * sizeof(uint)); if (data) { /* To avoid a large temp memory allocation, do copy row by row */ @@ -796,7 +796,7 @@ fallback_copy_texsubimage(struct gl_context *ctx, else { /* RGBA format */ GLfloat *tempSrc = - (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat)); + malloc(width * height * 4 * sizeof(GLfloat)); if (tempSrc && texDest) { const GLint dims = 2; @@ -835,8 +835,7 @@ fallback_copy_texsubimage(struct gl_context *ctx, _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage"); } - if (tempSrc) - free(tempSrc); + free(tempSrc); } st_texture_image_unmap(st, stImage); -- cgit v1.2.3