diff options
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_screen.c | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_context.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_state_init.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_context.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_queryobj.h | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_screen.c | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_state_init.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_texture.c | 2 |
8 files changed, 17 insertions, 17 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index 7476ca00414..6c53b4762e7 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -248,7 +248,7 @@ intel_allocate_image(int dri_format, void *loaderPrivate) { __DRIimage *image; - image = CALLOC(sizeof *image); + image = calloc(1, sizeof *image); if (image == NULL) return NULL; @@ -333,7 +333,7 @@ intel_create_image_from_renderbuffer(__DRIcontext *context, } irb = intel_renderbuffer(rb); - image = CALLOC(sizeof *image); + image = calloc(1, sizeof *image); if (image == NULL) return NULL; @@ -440,7 +440,7 @@ intel_dup_image(__DRIimage *orig_image, void *loaderPrivate) { __DRIimage *image; - image = CALLOC(sizeof *image); + image = calloc(1, sizeof *image); if (image == NULL) return NULL; @@ -1061,7 +1061,7 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp) } /* Allocate the private area */ - intelScreen = CALLOC(sizeof *intelScreen); + intelScreen = calloc(1, sizeof *intelScreen); if (!intelScreen) { fprintf(stderr, "\nERROR! Allocating private area failed\n"); return false; @@ -1143,7 +1143,7 @@ intelAllocateBuffer(__DRIscreen *screen, assert(attachment == __DRI_BUFFER_FRONT_LEFT || attachment == __DRI_BUFFER_BACK_LEFT); - intelBuffer = CALLOC(sizeof *intelBuffer); + intelBuffer = calloc(1, sizeof *intelBuffer); if (intelBuffer == NULL) return NULL; 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) { \ diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c index e17c7860b1f..ebc0c697003 100644 --- a/src/mesa/drivers/dri/radeon/radeon_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_context.c @@ -201,7 +201,7 @@ r100CreateContext( gl_api api, assert(screen); /* Allocate the Radeon context */ - rmesa = (r100ContextPtr) CALLOC( sizeof(*rmesa) ); + rmesa = (r100ContextPtr) calloc(1, sizeof(*rmesa)); if ( !rmesa ) { *error = __DRI_CTX_ERROR_NO_MEMORY; return GL_FALSE; diff --git a/src/mesa/drivers/dri/radeon/radeon_queryobj.h b/src/mesa/drivers/dri/radeon/radeon_queryobj.h index e5063934824..9ed61e237ed 100644 --- a/src/mesa/drivers/dri/radeon/radeon_queryobj.h +++ b/src/mesa/drivers/dri/radeon/radeon_queryobj.h @@ -42,7 +42,7 @@ void radeon_emit_queryobj(struct gl_context *ctx, struct radeon_state_atom *atom static inline void radeon_init_query_stateobj(radeonContextPtr radeon, int SZ) { radeon->query.queryobj.cmd_size = (SZ); - radeon->query.queryobj.cmd = (uint32_t*)CALLOC((SZ) * sizeof(uint32_t)); + radeon->query.queryobj.cmd = (uint32_t*) calloc(SZ, sizeof(uint32_t)); radeon->query.queryobj.name = "queryobj"; radeon->query.queryobj.idx = 0; radeon->query.queryobj.check = radeon_check_query_active; diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index 27b57c5a3ea..8384eb1c912 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -212,7 +212,7 @@ radeon_create_image_from_name(__DRIscreen *screen, if (name == 0) return NULL; - image = CALLOC(sizeof *image); + image = calloc(1, sizeof *image); if (image == NULL) return NULL; @@ -275,7 +275,7 @@ radeon_create_image_from_renderbuffer(__DRIcontext *context, } rrb = radeon_renderbuffer(rb); - image = CALLOC(sizeof *image); + image = calloc(1, sizeof *image); if (image == NULL) return NULL; @@ -310,7 +310,7 @@ radeon_create_image(__DRIscreen *screen, __DRIimage *image; radeonScreenPtr radeonScreen = screen->driverPrivate; - image = CALLOC(sizeof *image); + image = calloc(1, sizeof *image); if (image == NULL) return NULL; @@ -488,7 +488,7 @@ radeonCreateScreen2(__DRIscreen *sPriv) uint32_t device_id = 0; /* Allocate the private area */ - screen = (radeonScreenPtr) CALLOC( sizeof(*screen) ); + screen = (radeonScreenPtr) calloc(1, sizeof(*screen)); if ( !screen ) { fprintf(stderr, "%s: Could not allocate memory for screen structure", __FUNCTION__); fprintf(stderr, "leaving here\n"); diff --git a/src/mesa/drivers/dri/radeon/radeon_state_init.c b/src/mesa/drivers/dri/radeon/radeon_state_init.c index 1a7d2626aef..f162f88b25e 100644 --- a/src/mesa/drivers/dri/radeon/radeon_state_init.c +++ b/src/mesa/drivers/dri/radeon/radeon_state_init.c @@ -514,8 +514,8 @@ void radeonInitState( r100ContextPtr rmesa ) #define ALLOC_STATE_IDX( ATOM, CHK, SZ, NM, FLAG, 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.is_tcl = FLAG; \ rmesa->hw.ATOM.check = check_##CHK; \ diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index e405f9746f1..223a9872cc9 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -87,7 +87,7 @@ void copy_rows(void* dst, GLuint dststride, const void* src, GLuint srcstride, */ struct gl_texture_image *radeonNewTextureImage(struct gl_context *ctx) { - return CALLOC(sizeof(radeon_texture_image)); + return calloc(1, sizeof(radeon_texture_image)); } |