summaryrefslogtreecommitdiffstats
path: root/src/mesa/program/prog_instruction.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/program/prog_instruction.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/program/prog_instruction.c')
-rw-r--r--src/mesa/program/prog_instruction.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/mesa/program/prog_instruction.c b/src/mesa/program/prog_instruction.c
index 976024e3c7b..c1b952754f1 100644
--- a/src/mesa/program/prog_instruction.c
+++ b/src/mesa/program/prog_instruction.c
@@ -87,13 +87,7 @@ struct prog_instruction *
_mesa_realloc_instructions(struct prog_instruction *oldInst,
GLuint numOldInst, GLuint numNewInst)
{
- struct prog_instruction *newInst;
-
- newInst = (struct prog_instruction *)
- realloc(oldInst,
- numNewInst * sizeof(struct prog_instruction));
-
- return newInst;
+ return realloc(oldInst, numNewInst * sizeof(struct prog_instruction));
}