aboutsummaryrefslogtreecommitdiff
path: root/core/net/socket_linux.odin
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2023-11-11 13:16:12 +0100
committerGitHub <noreply@github.com>2023-11-11 13:16:12 +0100
commit3b5d28f0ee34792f4580006d68c2d66e99c1e064 (patch)
tree9d6e1c249ab6118688e604b86c2e18b6dc5e8e77 /core/net/socket_linux.odin
parent70c1f9d0e19a4b97c03308de8f2b9c0c28ba4cf1 (diff)
parent270348b112d0becce7726023b72784066d02306d (diff)
Merge pull request #2948 from flysand7/fix-do
[core]: Remove `do` keyword from the core library
Diffstat (limited to 'core/net/socket_linux.odin')
-rw-r--r--core/net/socket_linux.odin4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/net/socket_linux.odin b/core/net/socket_linux.odin
index 539317141..6d3f111d1 100644
--- a/core/net/socket_linux.odin
+++ b/core/net/socket_linux.odin
@@ -333,7 +333,9 @@ _set_option :: proc(sock: Any_Socket, option: Socket_Option, value: any, loc :=
.Send_Timeout,
.Receive_Timeout:
t, ok := value.(time.Duration)
- if !ok do panic("set_option() value must be a time.Duration here", loc)
+ if !ok {
+ panic("set_option() value must be a time.Duration here", loc)
+ }
micros := cast(i64) (time.duration_microseconds(t))
timeval_value.microseconds = cast(int) (micros % 1e6)