Mesa (master): i915g: Remove useless comparison

Stephane Marchesin marcheu at kemper.freedesktop.org
Fri Sep 6 18:07:43 UTC 2013


Module: Mesa
Branch: master
Commit: 9e14895884b129fd9e144970e705b8cb5a5f70c4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9e14895884b129fd9e144970e705b8cb5a5f70c4

Author: Stéphane Marchesin <marcheu at chromium.org>
Date:   Fri Sep  6 10:52:44 2013 -0700

i915g: Remove useless comparison

Fixes "Macro compares unsigned to 0" defect reported by Coverity.

---

 src/gallium/drivers/i915/i915_debug.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/i915/i915_debug.c b/src/gallium/drivers/i915/i915_debug.c
index b6c442d..b072031 100644
--- a/src/gallium/drivers/i915/i915_debug.c
+++ b/src/gallium/drivers/i915/i915_debug.c
@@ -913,7 +913,7 @@ i915_dump_batchbuffer( struct i915_winsys_batchbuffer *batch )
       debug_printf( "\n\nBATCH: ???\n");
       return;
    }
-   
+
    debug_printf( "\n\nBATCH: (%d)\n", (int)bytes / 4);
 
    while (!done &&
@@ -922,8 +922,7 @@ i915_dump_batchbuffer( struct i915_winsys_batchbuffer *batch )
       if (!i915_debug_packet( &stream ))
 	 break;
 
-      assert(stream.offset <= bytes &&
-	     stream.offset >= 0);
+      assert(stream.offset <= bytes);
    }
 
    debug_printf( "END-BATCH\n\n\n");




More information about the mesa-commit mailing list