aboutsummaryrefslogtreecommitdiff
path: root/core/net
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-06-29 19:11:36 +0100
committergingerBill <bill@gingerbill.org>2024-06-29 19:11:36 +0100
commit5413a8b744deba571287cc830e017369c46e847b (patch)
treeac4cfbdf14ac5368cbc0c9a1d1b581111927f595 /core/net
parent3f9a58808cd95946043ab38523588aec5d8c68dc (diff)
Even more style fixes
Diffstat (limited to 'core/net')
-rw-r--r--core/net/interface_darwin.odin4
-rw-r--r--core/net/socket_darwin.odin2
-rw-r--r--core/net/socket_linux.odin4
3 files changed, 5 insertions, 5 deletions
diff --git a/core/net/interface_darwin.odin b/core/net/interface_darwin.odin
index 59b0e01c5..68353264c 100644
--- a/core/net/interface_darwin.odin
+++ b/core/net/interface_darwin.odin
@@ -94,7 +94,7 @@ _enumerate_interfaces :: proc(allocator := context.allocator) -> (interfaces: []
state := Link_State{}
if .UP in ifaddr.flags {
- state |= {.Up}
+ state += {.Up}
}
/*if .DORMANT in ifaddr.flags {
@@ -102,7 +102,7 @@ _enumerate_interfaces :: proc(allocator := context.allocator) -> (interfaces: []
}*/
if .LOOPBACK in ifaddr.flags {
- state |= {.Loopback}
+ state += {.Loopback}
}
iface.link.state = state
}
diff --git a/core/net/socket_darwin.odin b/core/net/socket_darwin.odin
index ba86f1005..3f0e576c1 100644
--- a/core/net/socket_darwin.odin
+++ b/core/net/socket_darwin.odin
@@ -320,7 +320,7 @@ _set_blocking :: proc(socket: Any_Socket, should_block: bool) -> (err: Network_E
}
if should_block {
- flags &= ~int(os.O_NONBLOCK)
+ flags &~= int(os.O_NONBLOCK)
} else {
flags |= int(os.O_NONBLOCK)
}
diff --git a/core/net/socket_linux.odin b/core/net/socket_linux.odin
index dc960a5fb..a5d553234 100644
--- a/core/net/socket_linux.odin
+++ b/core/net/socket_linux.odin
@@ -377,9 +377,9 @@ _set_blocking :: proc(sock: Any_Socket, should_block: bool) -> (err: Network_Err
return Set_Blocking_Error(errno)
}
if should_block {
- flags &= ~{.NONBLOCK}
+ flags -= {.NONBLOCK}
} else {
- flags |= {.NONBLOCK}
+ flags += {.NONBLOCK}
}
errno = linux.fcntl(os_sock, linux.F_SETFL, flags)
if errno != .NONE {