1
0
Fork 0

Codechange: `char*` -> `char *`

pull/14206/head
Rubidium 2025-05-04 08:25:17 +02:00 committed by rubidium42
parent 3f2b39e3f8
commit 5e3c7c4146
4 changed files with 5 additions and 5 deletions

View File

@ -312,7 +312,7 @@ static SOCKET ListenLoopProc(addrinfo *runp)
int on = 1; int on = 1;
if (runp->ai_family == AF_INET6 && if (runp->ai_family == AF_INET6 &&
setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (const char*)&on, sizeof(on)) == -1) { setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, reinterpret_cast<const char *>(&on), sizeof(on)) == -1) {
Debug(net, 3, "Could not disable IPv4 over IPv6: {}", NetworkError::GetLast().AsString()); Debug(net, 3, "Could not disable IPv4 over IPv6: {}", NetworkError::GetLast().AsString());
} }

View File

@ -156,7 +156,7 @@ bool SetNoDelay([[maybe_unused]] SOCKET d)
#else #else
int flags = 1; int flags = 1;
/* The (const char *) cast is needed for windows */ /* The (const char *) cast is needed for windows */
return setsockopt(d, IPPROTO_TCP, TCP_NODELAY, (const char *)&flags, sizeof(flags)) == 0; return setsockopt(d, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast<const char *>(&flags), sizeof(flags)) == 0;
#endif #endif
} }