mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
net: remove unnecessary casts in socket operations
These methods in the Sock class wrap corresponding syscalls, accepting void* arguments and casting to char* internally, which is needed for Windows support and ignored on other platforms because the syscall itself accepts void*: Send() Recv() GetSockOpt() SetSockOpt()
This commit is contained in:
@@ -401,7 +401,7 @@ static bool HTTPBindAddresses(struct evhttp* http)
|
||||
// Set the no-delay option (disable Nagle's algorithm) on the TCP socket.
|
||||
evutil_socket_t fd = evhttp_bound_socket_get_fd(bind_handle);
|
||||
int one = 1;
|
||||
if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (sockopt_arg_type)&one, sizeof(one)) == SOCKET_ERROR) {
|
||||
if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast<char*>(&one), sizeof(one)) == SOCKET_ERROR) {
|
||||
LogInfo("WARNING: Unable to set TCP_NODELAY on RPC server socket, continuing anyway\n");
|
||||
}
|
||||
boundSockets.push_back(bind_handle);
|
||||
|
||||
Reference in New Issue
Block a user