From d154673f93ad95197bce8cadb995daa5bc39f5d8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 21 Jan 2014 20:04:48 +0000 Subject: minor code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@7820 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/netlib/netlibbind.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/modules/netlib/netlibbind.cpp') 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 { -- cgit v1.2.3