fix: minor dead store assignment warning in buildHandshakeMessage() (#1901)

This commit is contained in:
Charles Kerr 2021-10-08 10:41:57 -05:00 committed by GitHub
parent d2241cda67
commit e9a264f29d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -201,9 +201,8 @@ static bool buildHandshakeMessage(tr_handshake* handshake, uint8_t* buf)
memcpy(walk, torrent_hash, SHA_DIGEST_LENGTH);
walk += SHA_DIGEST_LENGTH;
memcpy(walk, peer_id, PEER_ID_LEN);
walk += PEER_ID_LEN;
TR_ASSERT(walk - buf == HANDSHAKE_SIZE);
TR_ASSERT(walk + PEER_ID_LEN - buf == HANDSHAKE_SIZE);
}
return success;