summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/imports.c
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-09-21 21:24:01 -0700
committerMatt Turner <[email protected]>2014-12-08 17:02:19 -0800
commit8af4aaf351313f9d4692697bf28d3c3f84e01ca4 (patch)
tree3d7fdabf8fc729efef9d011ac583acd0b7ae8e3d /src/mesa/main/imports.c
parentf0a8bcd84e50468a703a0ac366a4e067610df30c (diff)
Don't cast the return value of malloc/realloc
See commit 2b7a972e for the Coccinelle script. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/imports.c')
-rw-r--r--src/mesa/main/imports.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 4f5a2d11fa9..6945c2f621b 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -94,7 +94,7 @@ _mesa_align_malloc(size_t bytes, unsigned long alignment)
ASSERT( alignment > 0 );
- ptr = (uintptr_t)malloc(bytes + alignment + sizeof(void *));
+ ptr = malloc(bytes + alignment + sizeof(void *));
if (!ptr)
return NULL;
@@ -143,7 +143,7 @@ _mesa_align_calloc(size_t bytes, unsigned long alignment)
ASSERT( alignment > 0 );
- ptr = (uintptr_t)calloc(1, bytes + alignment + sizeof(void *));
+ ptr = calloc(1, bytes + alignment + sizeof(void *));
if (!ptr)
return NULL;