summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2014-02-18 01:18:59 +0200
committerZahary Karadjov <zahary@gmail.com>2014-02-18 01:19:31 +0200
commit765c682c92f27e13d079b146941033d7b68e261b (patch)
treeda29c07986179bd5e64792e2f0dcb0b7ff6e8851 /lib/pure
parentc484bf6ee4be0aa9476e518efc80c73563504ab4 (diff)
downloadNim-765c682c92f27e13d079b146941033d7b68e261b.tar.gz
fix #204;
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/sockets2.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/pure/sockets2.nim b/lib/pure/sockets2.nim
index 22624bbad..f8284b339 100644
--- a/lib/pure/sockets2.nim
+++ b/lib/pure/sockets2.nim
@@ -89,7 +89,7 @@ when defined(posix):
     of AF_UNIX:        result = posix.AF_UNIX
     of AF_INET:        result = posix.AF_INET
     of AF_INET6:       result = posix.AF_INET6
-    else: nil
+    else: discard
 
   proc toInt(typ: TType): cint =
     case typ
@@ -97,7 +97,7 @@ when defined(posix):
     of SOCK_DGRAM:     result = posix.SOCK_DGRAM
     of SOCK_SEQPACKET: result = posix.SOCK_SEQPACKET
     of SOCK_RAW:       result = posix.SOCK_RAW
-    else: nil
+    else: discard
 
   proc toInt(p: TProtocol): cint =
     case p
@@ -107,7 +107,7 @@ when defined(posix):
     of IPPROTO_IPV6:   result = posix.IPPROTO_IPV6
     of IPPROTO_RAW:    result = posix.IPPROTO_RAW
     of IPPROTO_ICMP:   result = posix.IPPROTO_ICMP
-    else: nil
+    else: discard
 
 else:
   proc toInt(domain: TDomain): cint = 
@@ -199,4 +199,4 @@ proc htons*(x: int16): int16 =
 
 when defined(Windows):
   var wsa: TWSADATA
-  if WSAStartup(0x0101'i16, addr wsa) != 0: OSError(OSLastError())
\ No newline at end of file
+  if WSAStartup(0x0101'i16, addr wsa) != 0: OSError(OSLastError())