summaryrefslogtreecommitdiff
path: root/src/modules/netlib/netlibbind.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/netlib/netlibbind.cpp')
-rw-r--r--src/modules/netlib/netlibbind.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/netlib/netlibbind.cpp b/src/modules/netlib/netlibbind.cpp
index 2c2ebf1530..382a00ee37 100644
--- a/src/modules/netlib/netlibbind.cpp
+++ b/src/modules/netlib/netlibbind.cpp
@@ -78,7 +78,7 @@ bool BindSocketToPort(const char *szPorts, SOCKET s, SOCKET s6, int* portn)
++portnum;
if (s == INVALID_SOCKET) continue;
- if ( !before && portnum <= *portn) continue;
+ if (!before && portnum <= *portn) continue;
if (before && portnum >= *portn)
return false;
@@ -210,7 +210,7 @@ INT_PTR NetlibBindPort(WPARAM wParam, LPARAM lParam)
they better have given wPort == 0, let's hope so */
if (nlu->settings.specifyIncomingPorts && nlu->settings.szIncomingPorts && nlb->wPort == 0)
{
- if ( !BindSocketToPort(nlu->settings.szIncomingPorts, nlbp->s, nlbp->s6, &nlu->outportnum))
+ if (!BindSocketToPort(nlu->settings.szIncomingPorts, nlbp->s, nlbp->s6, &nlu->outportnum))
{
NetlibLogf(nlu, "Netlib bind: Not enough ports for incoming connections specified");
SetLastError(WSAEADDRINUSE);
@@ -232,7 +232,7 @@ INT_PTR NetlibBindPort(WPARAM wParam, LPARAM lParam)
{
SOCKADDR_IN sin = {0};
int len = sizeof(sin);
- if ( !getsockname(nlbp->s, (PSOCKADDR)&sin, &len))
+ if (!getsockname(nlbp->s, (PSOCKADDR)&sin, &len))
sin6.sin6_port = sin.sin_port;
foundPort = 1;
}
@@ -240,7 +240,7 @@ INT_PTR NetlibBindPort(WPARAM wParam, LPARAM lParam)
if (bind(nlbp->s6, (PSOCKADDR)&sin6, sizeof(sin6)) == 0)
foundPort = 1;
}
- if ( !foundPort)
+ if (!foundPort)
{
NetlibLogf(nlu, "%s %d: %s() failed (%u)", __FILE__, __LINE__, "bind", WSAGetLastError());
closesocket(nlbp->s);
@@ -270,12 +270,12 @@ INT_PTR NetlibBindPort(WPARAM wParam, LPARAM lParam)
{
SOCKADDR_INET_M sin = {0};
int len = sizeof(sin);
- if ( !getsockname(nlbp->s, (PSOCKADDR)&sin, &len))
+ if (!getsockname(nlbp->s, (PSOCKADDR)&sin, &len))
{
nlb->wPort = ntohs(sin.Ipv4.sin_port);
nlb->dwInternalIP = ntohl(sin.Ipv4.sin_addr.S_un.S_addr);
}
- else if ( !getsockname(nlbp->s6, (PSOCKADDR)&sin, &len))
+ else if (!getsockname(nlbp->s6, (PSOCKADDR)&sin, &len))
nlb->wPort = ntohs(sin.Ipv6.sin6_port);
else
{