pipe: Fix InterlockedDecrement usage.
authorJosé Fonseca <jfonseca@vmware.com>
Fri, 17 Apr 2009 14:01:38 +0000 (15:01 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Fri, 17 Apr 2009 14:01:38 +0000 (15:01 +0100)
src/gallium/include/pipe/p_atomic.h

index 54dab12f894aa656c024c83cade419fd50f406eb..a963267e26430a51688b29cb6ff7d5fedae62f86 100644 (file)
@@ -234,7 +234,7 @@ struct pipe_atomic
 static INLINE boolean
 p_atomic_dec_zero(struct pipe_atomic *v)
 {
-   return InterlockedDecrement(&v->count);
+   return InterlockedDecrement(&v->count) != 0;
 }
 
 static INLINE void