Commit 35789d151dd967d0bd7f0017bef5e5551b081408

Thomas de Grivel 2018-06-17T16:38:22

type declaration

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/cffi-socket.lisp b/cffi-socket.lisp
index bc278dc..108b432 100644
--- a/cffi-socket.lisp
+++ b/cffi-socket.lisp
@@ -32,7 +32,7 @@
     s))
 
 (defun socket-close (fd)
-  (unless (= -1 (unistd:c-dup2 fd fd))
+  (unless (< (the fixnum (unistd:c-dup2 fd fd)) 0)
     (shutdown fd)
     (unistd:close fd)))