i965: Cleanup in intel_create_winsys_renderbuffer()
authorChad Versace <chadversary@chromium.org>
Sat, 27 May 2017 00:26:07 +0000 (17:26 -0700)
committerChad Versace <chadversary@chromium.org>
Thu, 1 Jun 2017 19:41:30 +0000 (12:41 -0700)
Combine variable declarations and assignments.
Trivial cleanup.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/intel_fbo.c

index d3905a5f7fe065d476fbfb4983df5110ed0ea1b2..d69b9216a200ad8dfd1cffc0ef7eb4e6e54c1cdf 100644 (file)
@@ -440,18 +440,15 @@ intel_nop_alloc_storage(struct gl_context * ctx, struct gl_renderbuffer *rb,
 struct intel_renderbuffer *
 intel_create_winsys_renderbuffer(mesa_format format, unsigned num_samples)
 {
-   struct intel_renderbuffer *irb;
-   struct gl_renderbuffer *rb;
-
    GET_CURRENT_CONTEXT(ctx);
 
-   irb = CALLOC_STRUCT(intel_renderbuffer);
+   struct intel_renderbuffer *irb = CALLOC_STRUCT(intel_renderbuffer);
    if (!irb) {
       _mesa_error(ctx, GL_OUT_OF_MEMORY, "creating renderbuffer");
       return NULL;
    }
 
-   rb = &irb->Base.Base;
+   struct gl_renderbuffer *rb = &irb->Base.Base;
    irb->layer_count = 1;
 
    _mesa_init_renderbuffer(rb, 0);