Skip to content

Commit a21dc46

Browse files
committed
sync: const-qualify the argument of double_lock_detected()
It is not modified in the function, so should be `const`.
1 parent 6d3689f commit a21dc46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sync.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ static void potential_deadlock_detected(const LockPair& mismatch, const LockStac
139139
throw std::logic_error(strprintf("potential deadlock detected: %s -> %s -> %s", mutex_b, mutex_a, mutex_b));
140140
}
141141

142-
static void double_lock_detected(const void* mutex, LockStack& lock_stack)
142+
static void double_lock_detected(const void* mutex, const LockStack& lock_stack)
143143
{
144144
LogPrintf("DOUBLE LOCK DETECTED\n");
145145
LogPrintf("Lock order:\n");

0 commit comments

Comments
 (0)