diff --git a/mfbt/LinkedList.h b/mfbt/LinkedList.h index c29760b3e73c..070f09e7a81f 100644 --- a/mfbt/LinkedList.h +++ b/mfbt/LinkedList.h @@ -361,7 +361,7 @@ class LinkedList for (slow = sentinel.next, fast1 = sentinel.next->next, fast2 = sentinel.next->next->next; - slow != sentinel && fast1 != sentinel && fast2 != sentinel; + slow != &sentinel && fast1 != &sentinel && fast2 != &sentinel; slow = slow->next, fast1 = fast2->next, fast2 = fast1->next) { MOZ_ASSERT(slow != fast1); @@ -372,7 +372,7 @@ class LinkedList for (slow = sentinel.prev, fast1 = sentinel.prev->prev, fast2 = sentinel.prev->prev->prev; - slow != sentinel && fast1 != sentinel && fast2 != sentinel; + slow != &sentinel && fast1 != &sentinel && fast2 != &sentinel; slow = slow->prev, fast1 = fast2->prev, fast2 = fast1->prev) { MOZ_ASSERT(slow != fast1); @@ -384,14 +384,14 @@ class LinkedList * isSentinel == true. */ for (const LinkedListElement* elem = sentinel.next; - elem != sentinel; + elem != &sentinel; elem = elem->next) { MOZ_ASSERT(!elem->isSentinel); } /* Check that the next/prev pointers match up. */ - const LinkedListElement* prev = sentinel; + const LinkedListElement* prev = &sentinel; const LinkedListElement* cur = sentinel.next; do { MOZ_ASSERT(cur->prev == prev); @@ -399,7 +399,7 @@ class LinkedList prev = cur; cur = cur->next; - } while (cur != sentinel); + } while (cur != &sentinel); #endif /* ifdef DEBUG */ }