summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaderapi.c
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-09-21 21:24:01 -0700
committerMatt Turner <[email protected]>2014-12-08 17:02:19 -0800
commit8af4aaf351313f9d4692697bf28d3c3f84e01ca4 (patch)
tree3d7fdabf8fc729efef9d011ac583acd0b7ae8e3d /src/mesa/main/shaderapi.c
parentf0a8bcd84e50468a703a0ac366a4e067610df30c (diff)
Don't cast the return value of malloc/realloc
See commit 2b7a972e for the Coccinelle script. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/shaderapi.c')
-rw-r--r--src/mesa/main/shaderapi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 66578204f08..6d831f7621d 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -274,9 +274,8 @@ attach_shader(struct gl_context *ctx, GLuint program, GLuint shader)
}
/* grow list */
- shProg->Shaders = (struct gl_shader **)
- realloc(shProg->Shaders,
- (n + 1) * sizeof(struct gl_shader *));
+ shProg->Shaders = realloc(shProg->Shaders,
+ (n + 1) * sizeof(struct gl_shader *));
if (!shProg->Shaders) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glAttachShader");
return;