diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-21 20:04:48 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-21 20:04:48 +0000 |
commit | d154673f93ad95197bce8cadb995daa5bc39f5d8 (patch) | |
tree | 191522aa88f9f845a9c27b1ddb86116b87033c4b /src/modules/netlib/netlibbind.cpp | |
parent | be50a70bfd8b3f3daf0c3351fdce6e2fea515bd7 (diff) |
minor code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@7820 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/netlib/netlibbind.cpp')
-rw-r--r-- | src/modules/netlib/netlibbind.cpp | 12 |
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
{
|