mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Merge pull request #6287
a794284locking: add a quick example of GUARDED_BY (Cory Fields)2b890ddlocking: fix a few small issues uncovered by -Wthread-safety (Cory Fields)cd27bbalocking: teach Clang's -Wthread-safety to cope with our scoped lock macros (Cory Fields)
This commit is contained in:
@@ -2183,8 +2183,10 @@ void CNode::EndMessage() UNLOCK_FUNCTION(cs_vSend)
|
||||
Fuzz(GetArg("-fuzzmessagestest", 10));
|
||||
|
||||
if (ssSend.size() == 0)
|
||||
{
|
||||
LEAVE_CRITICAL_SECTION(cs_vSend);
|
||||
return;
|
||||
|
||||
}
|
||||
// Set the size
|
||||
unsigned int nSize = ssSend.size() - CMessageHeader::HEADER_SIZE;
|
||||
WriteLE32((uint8_t*)&ssSend[CMessageHeader::MESSAGE_SIZE_OFFSET], nSize);
|
||||
|
||||
Reference in New Issue
Block a user