svga: avoid a calloc in svga_buffer_transfer_map()

Just initialize the two other pipe_transfer fields explicitly.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
This commit is contained in:
Brian Paul
2016-08-02 14:30:41 -06:00
parent f934117bbb
commit 1e5eb79d9a
@@ -84,7 +84,7 @@ svga_buffer_transfer_map(struct pipe_context *pipe,
assert(box->height == 1);
assert(box->depth == 1);
transfer = CALLOC_STRUCT(pipe_transfer);
transfer = MALLOC_STRUCT(pipe_transfer);
if (!transfer) {
return NULL;
}
@@ -93,6 +93,8 @@ svga_buffer_transfer_map(struct pipe_context *pipe,
transfer->level = level;
transfer->usage = usage;
transfer->box = *box;
transfer->stride = 0;
transfer->layer_stride = 0;
if ((usage & PIPE_TRANSFER_READ) && sbuf->dirty) {
enum pipe_error ret;