aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/program/prog_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/program/prog_cache.c')
-rw-r--r--mesalib/src/mesa/program/prog_cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesalib/src/mesa/program/prog_cache.c b/mesalib/src/mesa/program/prog_cache.c
index 2ccedb5d7..47f926b1b 100644
--- a/mesalib/src/mesa/program/prog_cache.c
+++ b/mesalib/src/mesa/program/prog_cache.c
@@ -88,7 +88,7 @@ rehash(struct gl_program_cache *cache)
cache->last = NULL;
size = cache->size * 3;
- items = (struct cache_item**) malloc(size * sizeof(*items));
+ items = malloc(size * sizeof(*items));
memset(items, 0, size * sizeof(*items));
for (i = 0; i < cache->size; i++)
@@ -141,7 +141,7 @@ _mesa_new_program_cache(void)
struct gl_program_cache *cache = CALLOC_STRUCT(gl_program_cache);
if (cache) {
cache->size = 17;
- cache->items = (struct cache_item **)
+ cache->items =
calloc(1, cache->size * sizeof(struct cache_item));
if (!cache->items) {
free(cache);