From 3744b5146df8530d3b43a972d58223cb3ffb533c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 15 Jun 2012 16:48:03 +0000 Subject: - fixes for the plugins options' dialog; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@430 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/netlib/netlibhttp.cpp | 4 ++-- src/modules/netlib/netliblog.cpp | 4 ++-- src/modules/netlib/netlibsock.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/modules/netlib') diff --git a/src/modules/netlib/netlibhttp.cpp b/src/modules/netlib/netlibhttp.cpp index 6c6c58a481..708ebf962f 100644 --- a/src/modules/netlib/netlibhttp.cpp +++ b/src/modules/netlib/netlibhttp.cpp @@ -905,7 +905,7 @@ INT_PTR NetlibHttpRecvHeaders(WPARAM wParam, LPARAM lParam) } buffer[bytesPeeked] = 0; - for (pbuffer = buffer, headersCount = 0; ; pbuffer = peol + 1, ++headersCount) + for (pbuffer = buffer, headersCount = 0;; pbuffer = peol + 1, ++headersCount) { peol = strchr(pbuffer, '\n'); if (peol == NULL) break; @@ -933,7 +933,7 @@ INT_PTR NetlibHttpRecvHeaders(WPARAM wParam, LPARAM lParam) nlhr->headersCount = headersCount; nlhr->headers = (NETLIBHTTPHEADER*)mir_calloc(sizeof(NETLIBHTTPHEADER) * headersCount); - for (pbuffer = buffer, headersCount = 0; ; pbuffer = peol + 1, ++headersCount) + for (pbuffer = buffer, headersCount = 0;; pbuffer = peol + 1, ++headersCount) { peol = strchr(pbuffer, '\n'); if (peol == NULL || peol == pbuffer || (peol == (pbuffer + 1) && *pbuffer == '\r')) break; diff --git a/src/modules/netlib/netliblog.cpp b/src/modules/netlib/netliblog.cpp index 8991f6ff24..6f633a6622 100644 --- a/src/modules/netlib/netliblog.cpp +++ b/src/modules/netlib/netliblog.cpp @@ -520,7 +520,7 @@ void NetlibDumpData(struct NetlibConnection *nlc, PBYTE buf, int len, int sent, szBuf = (char*)(useStack ? alloca(sz) : mir_alloc(sz)); CopyMemory(szBuf, szTitleLine, titleLineLen); pszBuf = szBuf + titleLineLen; - for ( line = 0; ; line += 16 ) { + for ( line = 0;; line += 16 ) { colsInLine = min(16, len - line); if (colsInLine == 16) { @@ -535,7 +535,7 @@ void NetlibDumpData(struct NetlibConnection *nlc, PBYTE buf, int len, int sent, for (col = 0; col < colsInLine; col++) pszBuf += wsprintfA(pszBuf, "%02X%c", buf[line + col], ((col&3) == 3 && col != 15)?'-':' '); // Fill out last line with blanks - for ( ; col<16; col++) + for (; col<16; col++) { lstrcpyA(pszBuf, " "); pszBuf += 3; diff --git a/src/modules/netlib/netlibsock.cpp b/src/modules/netlib/netlibsock.cpp index c2f5094aac..a4894a52ff 100644 --- a/src/modules/netlib/netlibsock.cpp +++ b/src/modules/netlib/netlibsock.cpp @@ -334,7 +334,7 @@ static NETLIBIPLIST* GetMyIpv4(void) PHOSTENT he = gethostbyname(hostname); unsigned n; - for (n = 0; he->h_addr_list[n]; ++n) ; + for (n = 0; he->h_addr_list[n]; ++n); NETLIBIPLIST *addr = (NETLIBIPLIST*)mir_calloc(n * 64 + 4); addr->cbNum = n; -- cgit v1.2.3