winsys/virgl: remove calloc/malloc casts
authorEmil Velikov <emil.l.velikov@gmail.com>
Wed, 28 Oct 2015 12:27:14 +0000 (12:27 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 30 Oct 2015 17:37:09 +0000 (17:37 +0000)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c

index 31317b906f5fd54ca5b32c80bb775391c13c4a63..8a74c4092979af2313ff3288d89a80accfbc7d0c 100644 (file)
@@ -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);
index 1c8df6e469d200d8e7bbd44ed53dddd6670117f2..28c4c62931bc4256ed6ace029731c6abbd2ad1c4 100644 (file)
@@ -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;