aboutgitcodebugslistschat
path: root/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'tcp.c')
-rw-r--r--tcp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/tcp.c b/tcp.c
index 2defc2d..1db8617 100644
--- a/tcp.c
+++ b/tcp.c
@@ -2679,7 +2679,7 @@ void tcp_sock_handler(const struct ctx *c, union epoll_ref ref,
* @ifname: Name of interface to bind to, NULL for any
* @port: Port, host order
*
- * Return: 0 on success, negative error code on failure
+ * Return: socket fd on success, negative error code on failure
*/
int tcp_listen(const struct ctx *c, uint8_t pif,
const union inany_addr *addr, const char *ifname, in_port_t port)
@@ -2728,10 +2728,7 @@ int tcp_listen(const struct ctx *c, uint8_t pif,
socks[port][V6] = s < 0 ? -1 : s;
}
- if (s < 0)
- return s;
-
- return 0;
+ return s;
}
/**