mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 06:38:47 +00:00
Even more style fixes
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user