Module: Mesa Branch: 9.0 Commit: 3f6ce3454f4d1331234f74670c82595f84269b1b URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3f6ce3454f4d1331234f74670c82595f84269b1b
Author: Brian Paul <[email protected]> Date: Thu Aug 30 16:12:53 2012 -0600 st/mesa: s/CALLOC/calloc/ to fix allocation bug The CALLOC() macro only takes one argument so this was being treated as a comma expression. Simply use calloc() instead. A follow-on patch will replace all CALLOC() calls with calloc(). NOTE: This is a candidate for the 8.0 and 9.0 branches. (cherry picked from commit 43ed822a50db6b980041ddf91c16c7f8fccc4092) --- src/mesa/state_tracker/st_mesa_to_tgsi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index 4d99b17..5604714 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -1198,7 +1198,7 @@ st_translate_mesa_program( * for these, so we put all the translated regs in t->constants. */ if (program->Parameters) { - t->constants = CALLOC( program->Parameters->NumParameters, + t->constants = calloc( program->Parameters->NumParameters, sizeof t->constants[0] ); if (t->constants == NULL) { ret = PIPE_ERROR_OUT_OF_MEMORY; _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
