From 4fdac659f800da0aa4504489f627738c83c94d66 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 1 Sep 2012 07:47:24 -0600 Subject: mesa: s/CALLOC/calloc/ v2: replace instances in dri/common/ dirs Reviewed-by: Matt Turner Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/r200/r200_context.c | 2 +- src/mesa/drivers/dri/r200/r200_state_init.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mesa/drivers/dri/r200') diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c index 5a5520b1f75..523a89dfc5e 100644 --- a/src/mesa/drivers/dri/r200/r200_context.c +++ b/src/mesa/drivers/dri/r200/r200_context.c @@ -235,7 +235,7 @@ GLboolean r200CreateContext( gl_api api, assert(screen); /* Allocate the R200 context */ - rmesa = (r200ContextPtr) CALLOC( sizeof(*rmesa) ); + rmesa = (r200ContextPtr) calloc(1, sizeof(*rmesa)); if ( !rmesa ) { *error = __DRI_CTX_ERROR_NO_MEMORY; return GL_FALSE; diff --git a/src/mesa/drivers/dri/r200/r200_state_init.c b/src/mesa/drivers/dri/r200/r200_state_init.c index a19e8583f3b..06e82429d76 100644 --- a/src/mesa/drivers/dri/r200/r200_state_init.c +++ b/src/mesa/drivers/dri/r200/r200_state_init.c @@ -627,8 +627,8 @@ void r200InitState( r200ContextPtr rmesa ) #define ALLOC_STATE( ATOM, CHK, SZ, NM, IDX ) \ do { \ rmesa->hw.ATOM.cmd_size = SZ; \ - rmesa->hw.ATOM.cmd = (GLuint *)CALLOC(SZ * sizeof(int)); \ - rmesa->hw.ATOM.lastcmd = (GLuint *)CALLOC(SZ * sizeof(int)); \ + rmesa->hw.ATOM.cmd = (GLuint *) calloc(SZ, sizeof(int)); \ + rmesa->hw.ATOM.lastcmd = (GLuint *) calloc(SZ, sizeof(int)); \ rmesa->hw.ATOM.name = NM; \ rmesa->hw.ATOM.idx = IDX; \ if (check_##CHK != check_never) { \ -- cgit v1.2.3