winsys/virgl: remove calloc/malloc casts

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Emil Velikov
2015-10-28 12:27:14 +00:00
parent 1ce685f05e
commit 72d7d1e224
2 changed files with 3 additions and 5 deletions
@@ -513,13 +513,12 @@ static struct virgl_cmd_buf *virgl_drm_cmd_buf_create(struct virgl_winsys *qws)
cbuf->ws = qws;
cbuf->nres = 512;
cbuf->res_bo = (struct virgl_hw_res **)
CALLOC(cbuf->nres, sizeof(struct virgl_hw_buf*));
cbuf->res_bo = CALLOC(cbuf->nres, sizeof(struct virgl_hw_buf*));
if (!cbuf->res_bo) {
FREE(cbuf);
return NULL;
}
cbuf->res_hlist = (uint32_t *)malloc(cbuf->nres * sizeof(uint32_t));
cbuf->res_hlist = malloc(cbuf->nres * sizeof(uint32_t));
if (!cbuf->res_hlist) {
FREE(cbuf->res_bo);
FREE(cbuf);
@@ -394,8 +394,7 @@ static struct virgl_cmd_buf *virgl_vtest_cmd_buf_create(struct virgl_winsys *vws
return NULL;
cbuf->nres = 512;
cbuf->res_bo = (struct virgl_hw_res **)
CALLOC(cbuf->nres, sizeof(struct virgl_hw_buf*));
cbuf->res_bo = CALLOC(cbuf->nres, sizeof(struct virgl_hw_buf*));
if (!cbuf->res_bo) {
FREE(cbuf);
return NULL;