summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gallium/drivers/svga/svga_resource_buffer.h b/src/gallium/drivers/svga/svga_resource_buffer.h
index 0591f8960b9..daf9c18a95a 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer.h
+++ b/src/gallium/drivers/svga/svga_resource_buffer.h
@@ -196,13 +196,11 @@ struct svga_buffer
static inline struct svga_buffer *
-svga_buffer(struct pipe_resource *buffer)
+svga_buffer(struct pipe_resource *resource)
{
- if (buffer) {
- assert(((struct svga_buffer *)buffer)->b.vtbl == &svga_buffer_vtbl);
- return (struct svga_buffer *)buffer;
- }
- return NULL;
+ struct svga_buffer *buf = (struct svga_buffer *) resource;
+ assert(buf == NULL || buf->b.vtbl == &svga_buffer_vtbl);
+ return buf;
}