mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-02 09:15:04 +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:
@@ -75,14 +75,6 @@ typedef unsigned int SOCKET;
|
||||
typedef SSIZE_T ssize_t;
|
||||
#endif
|
||||
|
||||
// The type of the option value passed to getsockopt & setsockopt
|
||||
// differs between Windows and non-Windows.
|
||||
#ifndef WIN32
|
||||
typedef void* sockopt_arg_type;
|
||||
#else
|
||||
typedef char* sockopt_arg_type;
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
// Export main() and ensure working ASLR when using mingw-w64.
|
||||
// Exporting a symbol will prevent the linker from stripping
|
||||
|
||||
Reference in New Issue
Block a user