Fix an invariant test that tries to catch locked tokens being left on the
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 1 Feb 2005 22:36:26 +0000 (22:36 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 1 Feb 2005 22:36:26 +0000 (22:36 +0000)
stack after a stack pop.

Submitted-by: Aggelos Economopoulos <aoiko@cc.ece.ntua.gr>
sys/kern/lwkt_token.c

index 6e0d83a..2c107b4 100644 (file)
@@ -31,7 +31,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $DragonFly: src/sys/kern/lwkt_token.c,v 1.10 2004/09/21 18:46:00 joerg Exp $
+ * $DragonFly: src/sys/kern/lwkt_token.c,v 1.11 2005/02/01 22:36:26 dillon Exp $
  */
 
 #ifdef _KERNEL
@@ -391,7 +391,7 @@ lwkt_reltoken(lwkt_tokref *_ref)
      */
     ref = _ref;
 #ifdef INVARIANTS
-    if ((((intptr_t)ref ^ (intptr_t)&_ref) && ~(intptr_t)PAGE_MASK) == 0)
+    if ((((intptr_t)ref ^ (intptr_t)&_ref) & ~(intptr_t)PAGE_MASK) == 0)
        KKASSERT((char *)ref > (char *)&_ref);
     KKASSERT(ref->tr_magic == LWKT_TOKREF_MAGIC1 || 
             ref->tr_magic == LWKT_TOKREF_MAGIC2);