aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/net.c')
-rw-r--r--src/net.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net.c b/src/net.c
index ceffba0..4ff7a4a 100644
--- a/src/net.c
+++ b/src/net.c
@@ -49,7 +49,7 @@ int net_bind(const char *port)
break;
close_socket:
- close(socket_fd);
+ check_errno(close(socket_fd), "close");
}
freeaddrinfo(result);
@@ -68,7 +68,7 @@ int net_bind(const char *port)
return socket_fd;
fail:
- close(socket_fd);
+ check_errno(close(socket_fd), "close");
return ret;
}
@@ -117,7 +117,7 @@ int net_connect(const char *host, const char *port)
break;
close_socket:
- close(socket_fd);
+ check_errno(close(socket_fd), "close");
}
freeaddrinfo(result);