mirror of
https://github.com/ntop/n2n.git
synced 2026-10-21 04:53:03 +00:00
added another type cast to socket handling
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user