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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user