Skip to content

Commit

Permalink
Fix SynchronizedTest bitmask checking
Browse files Browse the repository at this point in the history
  • Loading branch information
rcari committed Aug 5, 2022
1 parent fc89efe commit 4bea0d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions folly/test/SynchronizedTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -592,7 +592,7 @@ class TryLockable {
return false;
}
void unlockImpl(int lockableMask) {
if (kLockableType | lockableMask) {
if (kLockableType & lockableMask) {
onUnlock();
return;
}
Expand Down

0 comments on commit 4bea0d9

Please sign in to comment.