summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2013-11-03 14:43:53 -0800
committerVinson Lee <[email protected]>2013-11-03 14:45:59 -0800
commit68f1b274b06ed6f14cc8d069bee3cabc520fb553 (patch)
tree49c0e84fd79baf5476e1f6c9e7c5c2167d224ff5 /src/mesa/drivers
parent9943b6612b875286ab183c17e6ba89e2eafc77ab (diff)
i965: 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')
-rw-r--r--src/mesa/drivers/dri/i965/intel_blit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c
index b5857bbd5a7..0a03859df3e 100644
--- a/src/mesa/drivers/dri/i965/intel_blit.c
+++ b/src/mesa/drivers/dri/i965/intel_blit.c
@@ -417,8 +417,7 @@ intelEmitImmediateColorExpandBlit(struct brw_context *brw,
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)