i965: Move an 'i' declaration into its 'for' loop
authorChad Versace <chadversary@chromium.org>
Tue, 23 May 2017 23:35:34 +0000 (16:35 -0700)
committerChad Versace <chadversary@chromium.org>
Tue, 30 May 2017 19:01:37 +0000 (12:01 -0700)
In intel_update_dri2_buffers().
Trivial cleanup.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/mesa/drivers/dri/i965/brw_context.c

index adae921e57133737353359a5e2613cc72e632703..825912b7b5787ab456b01a09d2a5e17509185352 100644 (file)
@@ -1410,7 +1410,7 @@ intel_update_dri2_buffers(struct brw_context *brw, __DRIdrawable *drawable)
    struct gl_framebuffer *fb = drawable->driverPrivate;
    struct intel_renderbuffer *rb;
    __DRIbuffer *buffers = NULL;
-   int i, count;
+   int count;
    const char *region_name;
 
    /* Set this up front, so that in case our buffers get invalidated
@@ -1426,7 +1426,7 @@ intel_update_dri2_buffers(struct brw_context *brw, __DRIdrawable *drawable)
    if (buffers == NULL)
       return;
 
-   for (i = 0; i < count; i++) {
+   for (int i = 0; i < count; i++) {
        switch (buffers[i].attachment) {
        case __DRI_BUFFER_FRONT_LEFT:
            rb = intel_get_renderbuffer(fb, BUFFER_FRONT_LEFT);