summary refs log tree commit diff stats
path: root/tests/async/tnewasyncudp.nim
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2018-09-19 09:24:30 +0200
committerLemonBoy <thatlemon@gmail.com>2018-09-19 12:33:11 +0200
commita27429304e77ced5b9ba5729e47d6d6c7b7dae5c (patch)
treeeff2d0b0f26c407d291a62b5ea5381c4ec5344e3 /tests/async/tnewasyncudp.nim
parenta892d519a60e08212ea05e99bb9f858e6673ee6b (diff)
downloadNim-a27429304e77ced5b9ba5729e47d6d6c7b7dae5c.tar.gz
Convert *_family fields to cushort
Fixes #9008
Diffstat (limited to 'tests/async/tnewasyncudp.nim')
-rw-r--r--tests/async/tnewasyncudp.nim5
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/async/tnewasyncudp.nim b/tests/async/tnewasyncudp.nim
index e61f630e4..b442c0524 100644
--- a/tests/async/tnewasyncudp.nim
+++ b/tests/async/tnewasyncudp.nim
@@ -29,10 +29,7 @@ proc saveReceivedPort(port: int) =
 
 proc prepareAddress(intaddr: uint32, intport: uint16): ptr Sockaddr_in =
   result = cast[ptr Sockaddr_in](alloc0(sizeof(Sockaddr_in)))
-  when defined(windows):
-    result.sin_family = toInt(nativesockets.AF_INET).int16
-  else:
-    result.sin_family = toInt(nativesockets.AF_INET)
+  result.sin_family = toInt(nativesockets.AF_INET).uint16
   result.sin_port = nativesockets.htons(intport)
   result.sin_addr.s_addr = nativesockets.htonl(intaddr)