diff options
author | Jack Lloyd <[email protected]> | 2016-11-09 14:21:49 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-11-09 14:21:49 -0500 |
commit | e6bf87b6b0d4d9c3877b79de53de58dc34a3acca (patch) | |
tree | dfd672f072ec5fa97ea51c188dfa877818e1cd5a /src/cli/tls_client.cpp | |
parent | 72a898b26e0657391348a121d501328cb6b6cfdd (diff) |
Remove remaining old style casts.
Still not a hard error even in maintainer mode because sometimes
system headers pull in C style casts via macros (eg MAP_FAILED).
But, it not being a hard error makes it easy to backslide.
Diffstat (limited to 'src/cli/tls_client.cpp')
-rw-r--r-- | src/cli/tls_client.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cli/tls_client.cpp b/src/cli/tls_client.cpp index b97688386..de7e08086 100644 --- a/src/cli/tls_client.cpp +++ b/src/cli/tls_client.cpp @@ -240,7 +240,7 @@ class TLS_Client final : public Command, public Botan::TLS::Callbacks socket_info.sin_addr = *reinterpret_cast<struct in_addr*>(host_addr->h_addr); // FIXME - if(::connect(fd, (sockaddr*)&socket_info, sizeof(struct sockaddr)) != 0) + if(::connect(fd, reinterpret_cast<sockaddr*>(&socket_info), sizeof(struct sockaddr)) != 0) { ::close(fd); throw CLI_Error("connect failed"); @@ -289,8 +289,7 @@ class TLS_Client final : public Command, public Botan::TLS::Callbacks while(length) { - ssize_t sent = ::send(m_sockfd, (const char*)buf + offset, - length, MSG_NOSIGNAL); + ssize_t sent = ::send(m_sockfd, buf + offset, length, MSG_NOSIGNAL); if(sent == -1) { |