pipebuffer: split up assertion
authorBrian Paul <brianp@vmware.com>
Wed, 18 Apr 2012 14:30:30 +0000 (08:30 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 18 Apr 2012 14:34:48 +0000 (08:34 -0600)
The problem with assert(a && b) is you don't know which term is zero
when there's a failure.

src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c

index 2ea63d6cc79ea11c56275bc8fbfd3e5f4a11741d..567303aa55ef495e4f518f1948359078589a72a7 100644 (file)
@@ -210,7 +210,8 @@ pb_debug_buffer_check(struct pb_debug_buffer *buf)
       if(underflow || overflow)
          debug_backtrace_dump(buf->create_backtrace, PB_DEBUG_CREATE_BACKTRACE);
 
-      debug_assert(!underflow && !overflow);
+      debug_assert(!underflow);
+      debug_assert(!overflow);
 
       /* re-fill if not aborted */
       if(underflow)