diff options
author | MacroFake <falke.marco@gmail.com> | 2022-09-14 13:06:21 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-09-14 13:06:25 +0200 |
commit | a8c3590890640aff039491b9b4e0c8eee0c7fdb6 (patch) | |
tree | 1e123b46e49f7a1a06d2368789e06c5d34419eed | |
parent | 13fd9ee5c2d747e9f74d3fd8e33a4f0c9eaa769c (diff) | |
parent | 0f0cc05e4cf6ccdd514a23d8aa916942dfc1e352 (diff) |
Merge bitcoin/bitcoin#25831: refactor: Remove trailing semicolon from LOCK2 macro
0f0cc05e4cf6ccdd514a23d8aa916942dfc1e352 refactor: Remove trailing semicolon from LOCK2 (Aurèle Oulès)
Pull request description:
Macros should not have a trailing semi-colon to avoid empty statements when using them with another semi-colon.
Noticed this while reviewing a PR.
ACKs for top commit:
vasild:
ACK 0f0cc05e4cf6ccdd514a23d8aa916942dfc1e352
Tree-SHA512: 97fa4d89f5131ac30e05b293f750b757d5526feed56885c6feeb403b3ac3d3d3205874bc507c3b56a8296a6e3bdc8d879b2c339784f1e6ab1963d1b8a8d7b02f
-rw-r--r-- | src/sync.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sync.h b/src/sync.h index 7ec4b668ac..c34d969041 100644 --- a/src/sync.h +++ b/src/sync.h @@ -261,7 +261,7 @@ inline RecursiveMutex* MaybeCheckNotHeld(RecursiveMutex* cs) LOCKS_EXCLUDED(cs) #define LOCK(cs) DebugLock<decltype(cs)> UNIQUE_NAME(criticalblock)(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__) #define LOCK2(cs1, cs2) \ DebugLock<decltype(cs1)> criticalblock1(MaybeCheckNotHeld(cs1), #cs1, __FILE__, __LINE__); \ - DebugLock<decltype(cs2)> criticalblock2(MaybeCheckNotHeld(cs2), #cs2, __FILE__, __LINE__); + DebugLock<decltype(cs2)> criticalblock2(MaybeCheckNotHeld(cs2), #cs2, __FILE__, __LINE__) #define TRY_LOCK(cs, name) DebugLock<decltype(cs)> name(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__, true) #define WAIT_LOCK(cs, name) DebugLock<decltype(cs)> name(MaybeCheckNotHeld(cs), #cs, __FILE__, __LINE__) |