summaryrefslogtreecommitdiffstats
path: root/src/lib/tcp/tcp_stream_msg.cc
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2022-12-17 15:56:56 +0100
committerFrancis Dupont <fdupont@isc.org>2022-12-17 15:56:56 +0100
commit0fea6479fae6a3cd5435b8b50beba864760e9407 (patch)
tree6d43390684fecc9aafcf84ad2f61df53f228970a /src/lib/tcp/tcp_stream_msg.cc
parent[#2684] Fixed TcpStreamRequest::postBuffer (diff)
downloadkea-0fea6479fae6a3cd5435b8b50beba864760e9407.tar.xz
kea-0fea6479fae6a3cd5435b8b50beba864760e9407.zip
[#2684] Some improvements included generated tests
Diffstat (limited to 'src/lib/tcp/tcp_stream_msg.cc')
-rw-r--r--src/lib/tcp/tcp_stream_msg.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/tcp/tcp_stream_msg.cc b/src/lib/tcp/tcp_stream_msg.cc
index cd269be509..1435292bf7 100644
--- a/src/lib/tcp/tcp_stream_msg.cc
+++ b/src/lib/tcp/tcp_stream_msg.cc
@@ -22,7 +22,7 @@ TcpStreamRequest::needData() const {
}
size_t
-TcpStreamRequest::postBuffer(const void* buf, const size_t nbytes) {
+TcpStreamRequest::postBuffer(const void* buf, const size_t nbytes) {
if (!nbytes) {
// Nothing to do.
return (0);
@@ -55,8 +55,8 @@ TcpStreamRequest::postBuffer(const void* buf, const size_t nbytes) {
// If we have enough to do it, calculate the expected length.
if (wire_size == 2 ) {
const uint8_t* cp = static_cast<const uint8_t*>(wire_data_.data());
- uint16_t len = ((unsigned int)(cp[0])) << 8;
- len |= ((unsigned int)(cp[1]));
+ uint16_t len = static_cast<unsigned int>(cp[0]) << 8;
+ len |= static_cast<unsigned int>(cp[1]);
expected_size_ = len + sizeof(len);
}
}