summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2013-11-03 14:42:18 -0800
committerVinson Lee <[email protected]>2013-11-03 14:45:56 -0800
commit9943b6612b875286ab183c17e6ba89e2eafc77ab (patch)
tree52a337ee7b8aaac28f1b811806a56ecc90978490 /src/mesa/drivers/dri
parent14ddc8334698d74e28288fe16fe83ffd62c80a1a (diff)
i915: Fix logic_op check.
Fixes "Macro compares unsigned to 0" defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i915/intel_blit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_blit.c b/src/mesa/drivers/dri/i915/intel_blit.c
index 7b59708343b..5147d8ee307 100644
--- a/src/mesa/drivers/dri/i915/intel_blit.c
+++ b/src/mesa/drivers/dri/i915/intel_blit.c
@@ -534,8 +534,7 @@ intelEmitImmediateColorExpandBlit(struct intel_context *intel,
return false;
}
- assert( logic_op - GL_CLEAR >= 0 );
- assert( logic_op - GL_CLEAR < 0x10 );
+ assert((logic_op >= GL_CLEAR) && (logic_op <= (GL_CLEAR + 0x0f)));
assert(dst_pitch > 0);
if (w < 0 || h < 0)