summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2015-04-28 13:33:46 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2015-05-28 15:40:18 +0100
commitd0e592d4e9b59d9cc185f1d63b3c1dd818e95098 (patch)
treeb23317fa982e1d15a877b65929db2c7ea53c0003
parent128344c2cf22385dedece5a3d774d3a24527d2de (diff)
xf86drm: simplify drmMalloc/drmFree
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--xf86drm.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/xf86drm.c b/xf86drm.c
index b5a174bd..2245f995 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -141,16 +141,12 @@ void *drmGetHashTable(void)
void *drmMalloc(int size)
{
- void *pt;
- if ((pt = malloc(size)))
- memset(pt, 0, size);
- return pt;
+ return calloc(1, size);
}
void drmFree(void *pt)
{
- if (pt)
- free(pt);
+ free(pt);
}
/**