[cairo-commit] src/drm

Chris Wilson ickle at kemper.freedesktop.org
Wed Feb 10 13:10:38 PST 2010


 src/drm/cairo-drm-i965-surface.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 4113e455a317785b83324215a6b0156995665989
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Feb 10 21:09:56 2010 +0000

    drm/i965: fix use of uninitialized variable whilst dumping errors
    
    Cut'n'paste bug from i915 error path.

diff --git a/src/drm/cairo-drm-i965-surface.c b/src/drm/cairo-drm-i965-surface.c
index 0e0def8..e1bdf5f 100644
--- a/src/drm/cairo-drm-i965-surface.c
+++ b/src/drm/cairo-drm-i965-surface.c
@@ -351,8 +351,6 @@ i965_exec (i965_device_t *device, uint32_t offset)
 	ret = ioctl (device->intel.base.fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf);
     } while (ret != 0 && errno == EINTR);
     if (unlikely (ret)) {
-	int n;
-
 	if (errno == ENOMEM)
 	    status = _cairo_error (CAIRO_STATUS_NO_MEMORY);
 	else
@@ -364,9 +362,9 @@ i965_exec (i965_device_t *device, uint32_t offset)
 
 	fprintf (stderr, "   %d buffers:\n",
 		 device->exec.count);
-	for (n = 0; n < i; n++) {
+	for (i = 0; i < device->exec.count; i++) {
 	    fprintf (stderr, "     exec[%d] = %d\n",
-		     n, device->exec.bo[n]->base.size);
+		     i, device->exec.bo[i]->base.size);
 	}
 
 	intel_dump_batchbuffer ((uint32_t *) device->batch.data,


More information about the cairo-commit mailing list