i830: Move assert-only code into the assert.
authorEric Anholt <eric@anholt.net>
Thu, 11 Apr 2013 17:06:06 +0000 (10:06 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 12 Apr 2013 23:32:12 +0000 (16:32 -0700)
The call has no side effects, and moving it into the assert cleans up a
compile warning in the release build.

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i915/i830_vtbl.c

index 6019852bf6c9b7c7c73ff421910d78a705967fd4..b30f45edfa80eb47a77d97eff7480f6d10c1a508 100644 (file)
@@ -179,8 +179,6 @@ i830_render_start(struct intel_context *intel)
        v2 != i830->state.Ctx[I830_CTXREG_VF2] ||
        mcsb1 != i830->state.Ctx[I830_CTXREG_MCSB1] ||
        index_bitset != i830->last_index_bitset) {
-      int k;
-
       I830_STATECHANGE(i830, I830_UPLOAD_CTX);
 
       /* Must do this *after* statechange, so as not to affect
@@ -199,8 +197,7 @@ i830_render_start(struct intel_context *intel)
       i830->state.Ctx[I830_CTXREG_MCSB1] = mcsb1;
       i830->last_index_bitset = index_bitset;
 
-      k = i830_check_vertex_size(intel, intel->vertex_size);
-      assert(k);
+      assert(i830_check_vertex_size(intel, intel->vertex_size));
    }
 }