diff --git a/folly/test/SynchronizedTest.cpp b/folly/test/SynchronizedTest.cpp index ac4f1a373cf..8789dded88c 100644 --- a/folly/test/SynchronizedTest.cpp +++ b/folly/test/SynchronizedTest.cpp @@ -578,7 +578,7 @@ class TryLockable { bool tryLockImpl(int lockableMask) { // if the lockable type of this instance is one of the possible options as // expressed in the mask go through the usual test code - if (kLockableType | lockableMask) { + if (kLockableType & lockableMask) { if (kShouldSucceed) { onLock(); return true; @@ -592,7 +592,7 @@ class TryLockable { return false; } void unlockImpl(int lockableMask) { - if (kLockableType | lockableMask) { + if (kLockableType & lockableMask) { onUnlock(); return; }