mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-11 07:09:29 +02: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:
@@ -24,7 +24,7 @@ static bool SocketIsClosed(const SOCKET& s)
|
||||
// wrongly pretend that the socket is not closed.
|
||||
int type;
|
||||
socklen_t len = sizeof(type);
|
||||
return getsockopt(s, SOL_SOCKET, SO_TYPE, (sockopt_arg_type)&type, &len) == SOCKET_ERROR;
|
||||
return getsockopt(s, SOL_SOCKET, SO_TYPE, reinterpret_cast<char*>(&type), &len) == SOCKET_ERROR;
|
||||
}
|
||||
|
||||
static SOCKET CreateSocket()
|
||||
|
||||
Reference in New Issue
Block a user