diff options
author | SChernykh <sergey.v.chernykh@gmail.com> | 2022-02-19 10:17:53 +0100 |
---|---|---|
committer | SChernykh <sergey.v.chernykh@gmail.com> | 2022-02-19 10:17:53 +0100 |
commit | f68f92776baf89b65db41314102663be533cdb1a (patch) | |
tree | 0ac380e4d1f427701bf8db61eb1fe77115d0c773 /contrib/epee/include/net/levin_client.inl | |
parent | Merge pull request #8135 (diff) | |
download | monero-f68f92776baf89b65db41314102663be533cdb1a.tar.xz |
Undefined behaviour fixes
Fixes issues reported in #8120
Diffstat (limited to 'contrib/epee/include/net/levin_client.inl')
-rw-r--r-- | contrib/epee/include/net/levin_client.inl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/epee/include/net/levin_client.inl b/contrib/epee/include/net/levin_client.inl index 2f048b027..177dd8967 100644 --- a/contrib/epee/include/net/levin_client.inl +++ b/contrib/epee/include/net/levin_client.inl @@ -82,7 +82,7 @@ int levin_client_impl::invoke(int command, const epee::span<const uint8_t> in_bu bucket_head head = {0}; head.m_signature = SWAP64LE(LEVIN_SIGNATURE); head.m_cb = SWAP64LE(in_buff.size()); - head.m_have_to_return_data = true; + head.m_have_to_return_data = 1; head.m_command = SWAP32LE(command); if(!m_transport.send(&head, sizeof(head))) return -1; @@ -118,7 +118,7 @@ int levin_client_impl::notify(int command, const std::string& in_buff) bucket_head head = {0}; head.m_signature = SWAP64LE(LEVIN_SIGNATURE); head.m_cb = SWAP64LE(in_buff.size()); - head.m_have_to_return_data = false; + head.m_have_to_return_data = 0; head.m_command = SWAP32LE(command); if(!m_transport.send((const char*)&head, sizeof(head))) @@ -141,7 +141,7 @@ inline bucket_head2 head = {0}; head.m_signature = SWAP64LE(LEVIN_SIGNATURE); head.m_cb = SWAP64LE(in_buff.size()); - head.m_have_to_return_data = true; + head.m_have_to_return_data = 1; head.m_command = SWAP32LE(command); head.m_return_code = SWAP32LE(0); head.m_flags = SWAP32LE(LEVIN_PACKET_REQUEST); @@ -179,7 +179,7 @@ inline bucket_head2 head = {0}; head.m_signature = SWAP64LE(LEVIN_SIGNATURE); head.m_cb = SWAP64LE(in_buff.size()); - head.m_have_to_return_data = false; + head.m_have_to_return_data = 0; head.m_command = SWAP32LE(command); head.m_return_code = SWAP32LE(0); head.m_flags = SWAP32LE(LEVIN_PACKET_REQUEST); |