From aa10a08696cae93799fcddae3f0245ceee905e01 Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 6 Sep 2012 08:48:23 +0200 Subject: xserver mesa git update 6 sep 2012 --- mesalib/src/mesa/program/prog_cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesalib/src/mesa/program/prog_cache.c') 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); -- cgit v1.2.3