From: Vinson Lee Date: Sun, 3 Nov 2013 22:43:53 +0000 (-0800) Subject: i965: Fix logic_op check. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=68f1b274b06ed6f14cc8d069bee3cabc520fb553;p=mesa.git i965: Fix logic_op check. Fixes "Macro compares unsigned to 0" defect reported by Coverity. Signed-off-by: Vinson Lee Reviewed-by: Ian Romanick --- 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)