diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-13 17:26:45 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-13 17:26:45 +0000 |
commit | 5e686292c537275c8ea1399f311c082d905e8a63 (patch) | |
tree | 88a4f3921ff70323775f3329c8820a0fe947d74f /src/modules/netlib/netlibpktrecver.cpp | |
parent | 90c154b4be566ec4a804217d0f1e50fb1e259b72 (diff) |
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@398 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/netlib/netlibpktrecver.cpp')
-rw-r--r-- | src/modules/netlib/netlibpktrecver.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/netlib/netlibpktrecver.cpp b/src/modules/netlib/netlibpktrecver.cpp index 91fc4ddbe9..401e545792 100644 --- a/src/modules/netlib/netlibpktrecver.cpp +++ b/src/modules/netlib/netlibpktrecver.cpp @@ -28,12 +28,12 @@ INT_PTR NetlibPacketRecverCreate(WPARAM wParam,LPARAM lParam) struct NetlibConnection *nlc=(struct NetlibConnection*)wParam;
struct NetlibPacketRecver *nlpr;
- if (GetNetlibHandleType(nlc)!=NLH_CONNECTION || lParam==0) {
+ if (GetNetlibHandleType(nlc) != NLH_CONNECTION || lParam == 0) {
SetLastError(ERROR_INVALID_PARAMETER);
return (INT_PTR)(struct NetlibPacketRecver*)NULL;
}
nlpr=(struct NetlibPacketRecver*)mir_calloc(sizeof(struct NetlibPacketRecver));
- if (nlpr==NULL) {
+ if (nlpr == NULL) {
SetLastError(ERROR_OUTOFMEMORY);
return (INT_PTR)(struct NetlibPacketRecver*)NULL;
}
@@ -53,7 +53,7 @@ INT_PTR NetlibPacketRecverGetMore(WPARAM wParam,LPARAM lParam) NETLIBPACKETRECVER *nlprParam=(NETLIBPACKETRECVER*)lParam;
INT_PTR recvResult;
- if (GetNetlibHandleType(nlpr)!=NLH_PACKETRECVER || nlprParam==NULL || nlprParam->cbSize!=sizeof(NETLIBPACKETRECVER) || nlprParam->bytesUsed>nlpr->packetRecver.bytesAvailable) {
+ if (GetNetlibHandleType(nlpr) != NLH_PACKETRECVER || nlprParam == NULL || nlprParam->cbSize != sizeof(NETLIBPACKETRECVER) || nlprParam->bytesUsed>nlpr->packetRecver.bytesAvailable) {
SetLastError(ERROR_INVALID_PARAMETER);
return SOCKET_ERROR;
}
@@ -62,8 +62,8 @@ INT_PTR NetlibPacketRecverGetMore(WPARAM wParam,LPARAM lParam) return SOCKET_ERROR;
}
nlpr->packetRecver.dwTimeout=nlprParam->dwTimeout;
- if (nlprParam->bytesUsed==0) {
- if (nlpr->packetRecver.bytesAvailable==nlpr->packetRecver.bufferSize) {
+ if (nlprParam->bytesUsed == 0) {
+ if (nlpr->packetRecver.bytesAvailable == nlpr->packetRecver.bufferSize) {
nlpr->packetRecver.bytesAvailable=0;
NetlibLogf(nlpr->nlc->nlu,"Packet recver: packet overflowed buffer, ditching");
}
@@ -72,7 +72,7 @@ INT_PTR NetlibPacketRecverGetMore(WPARAM wParam,LPARAM lParam) MoveMemory(nlpr->packetRecver.buffer,nlpr->packetRecver.buffer+nlprParam->bytesUsed,nlpr->packetRecver.bytesAvailable-nlprParam->bytesUsed);
nlpr->packetRecver.bytesAvailable-=nlprParam->bytesUsed;
}
- if (nlprParam->dwTimeout!=INFINITE) {
+ if (nlprParam->dwTimeout != INFINITE) {
if (!si.pending(nlpr->nlc->hSsl) && WaitUntilReadable(nlpr->nlc->s,nlprParam->dwTimeout) <= 0) {
*nlprParam=nlpr->packetRecver;
return SOCKET_ERROR;
|