summaryrefslogtreecommitdiff
path: root/src/libstddjb/socket_tcp6.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/socket_tcp6.c')
-rw-r--r--src/libstddjb/socket_tcp6.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libstddjb/socket_tcp6.c b/src/libstddjb/socket_tcp6.c
index df6dd86..cc42f68 100644
--- a/src/libstddjb/socket_tcp6.c
+++ b/src/libstddjb/socket_tcp6.c
@@ -1,9 +1,9 @@
/* ISC license. */
#include <skalibs/nonposix.h>
-#include <errno.h>
#include <sys/socket.h>
#include <netinet/in.h>
+#include <errno.h>
#include <skalibs/djbunix.h>
#include <skalibs/ip46.h>
#include <skalibs/socket.h>
@@ -18,9 +18,7 @@ int socket_tcp6_internal (unsigned int flags)
int option = 1 ;
if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &option, sizeof(option)) < 0)
{
- int e = errno ;
fd_close(fd) ;
- errno = e ;
return -1 ;
}
}