From 8eb13165d406bbb2996465d4aa2f1fb0c82631ec Mon Sep 17 00:00:00 2001 From: Logan oos Even <46396513+Logan007@users.noreply.github.com> Date: Mon, 13 Sep 2021 15:07:34 +0545 Subject: [PATCH] added another type cast to socket handling --- src/n2n.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/n2n.c b/src/n2n.c index e705c64..b12b0ef 100644 --- a/src/n2n.c +++ b/src/n2n.c @@ -34,7 +34,7 @@ SOCKET open_socket (int local_port, in_addr_t address, int type /* 0 = UDP, TCP struct sockaddr_in local_address; int sockopt; - if((sock_fd = socket(PF_INET, ((type == 0) ? SOCK_DGRAM : SOCK_STREAM) , 0)) < 0) { + if((int)(sock_fd = socket(PF_INET, ((type == 0) ? SOCK_DGRAM : SOCK_STREAM) , 0)) < 0) { traceEvent(TRACE_ERROR, "Unable to create socket [%s][%d]\n", strerror(errno), sock_fd); return(-1);