Updated indentation to C3 standard.

This commit is contained in:
Christoffer Lerno
2023-07-26 14:01:24 +02:00
parent a376d8e2bf
commit 499c82b089
83 changed files with 2357 additions and 2356 deletions

View File

@@ -16,11 +16,11 @@ struct AddrInfo
struct @if(env::WIN32 || env::DARWIN)
{
ZString ai_canonname;
SockAddrPtr ai_addr;
SockAddrPtr ai_addr;
}
struct @if(env::LINUX)
{
SockAddrPtr ai_addr;
SockAddrPtr ai_addr;
ZString ai_canonname;
}
AddrInfo* ai_next;

View File

@@ -25,7 +25,7 @@ macro void! NativeSocket.close(self)
macro void! NativeSocket.set_non_blocking(self)
{
int flags = fcntl(self, F_GETFL, 0);
if (fcntl(self, F_SETFL, flags | O_NONBLOCK) == -1)
if (fcntl(self, F_SETFL, flags | O_NONBLOCK) == -1)
{
if (libc::errno() == errno::EBADF) return NetError.INVALID_SOCKET?;
return NetError.GENERAL_ERROR?;

View File

@@ -19,11 +19,11 @@ extern fn NativeSocket accept(NativeSocket, SockAddrPtr address, Socklen_t* addr
macro NativeSocket.close(self)
{
if (int err = closesocket(self))
{
if (err == WSAENOTSOCK) return NetError.INVALID_SOCKET?;
if (int err = closesocket(self))
{
if (err == WSAENOTSOCK) return NetError.INVALID_SOCKET?;
return NetError.GENERAL_ERROR?;
}
}
}
const int WSAENOTSOCK = 10038;