Skip to content

Commit 3a6683c

Browse files
MacroFakevijaydasmp
authored andcommitted
Merge bitcoin#25831: refactor: Remove trailing semicolon from LOCK2 macro
0f0cc05 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 0f0cc05 Tree-SHA512: 97fa4d89f5131ac30e05b293f750b757d5526feed56885c6feeb403b3ac3d3d3205874bc507c3b56a8296a6e3bdc8d879b2c339784f1e6ab1963d1b8a8d7b02f
1 parent cc52355 commit 3a6683c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sync.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ using ReadLock = SharedLock<typename std::remove_reference<typename std::remove_
313313
#define READ_LOCK(cs) ReadLock<decltype(cs)> UNIQUE_NAME(criticalblock)(cs, #cs, __FILE__, __LINE__)
314314
#define LOCK2(cs1, cs2) \
315315
DebugLock<decltype(cs1)> criticalblock1(cs1, #cs1, __FILE__, __LINE__); \
316-
DebugLock<decltype(cs2)> criticalblock2(cs2, #cs2, __FILE__, __LINE__);
316+
DebugLock<decltype(cs2)> criticalblock2(cs2, #cs2, __FILE__, __LINE__)
317317
#define TRY_LOCK(cs, name) DebugLock<decltype(cs)> name(cs, #cs, __FILE__, __LINE__, true)
318318
#define TRY_READ_LOCK(cs, name) ReadLock<decltype(cs)> name(cs, #cs, __FILE__, __LINE__, true)
319319
#define WAIT_LOCK(cs, name) DebugLock<decltype(cs)> name(cs, #cs, __FILE__, __LINE__)

0 commit comments

Comments
 (0)