summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/imports.c
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2014-09-21 21:24:01 -0700
committerMatt Turner <mattst88@gmail.com>2014-12-08 17:02:19 -0800
commit8af4aaf351313f9d4692697bf28d3c3f84e01ca4 (patch)
tree3d7fdabf8fc729efef9d011ac583acd0b7ae8e3d /src/mesa/main/imports.c
parentf0a8bcd84e50468a703a0ac366a4e067610df30c (diff)
downloadexternal_mesa3d-8af4aaf351313f9d4692697bf28d3c3f84e01ca4.zip
external_mesa3d-8af4aaf351313f9d4692697bf28d3c3f84e01ca4.tar.gz
external_mesa3d-8af4aaf351313f9d4692697bf28d3c3f84e01ca4.tar.bz2
Don't cast the return value of malloc/realloc
See commit 2b7a972e for the Coccinelle script. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
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 4f5a2d1..6945c2f 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;