summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src/fam_15icqserver.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-12-05 14:50:31 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-12-05 14:50:31 +0000
commitae10177eb1e515eada4aa2b4295aab02d1f7c176 (patch)
treea42597711316c7a9757e3598c48cf76c3fdf4a72 /protocols/IcqOscarJ/src/fam_15icqserver.cpp
parent8961403e3a5002fd284422f8c6ec5a78fdd81816 (diff)
warning fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@11251 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/src/fam_15icqserver.cpp')
-rw-r--r--protocols/IcqOscarJ/src/fam_15icqserver.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/protocols/IcqOscarJ/src/fam_15icqserver.cpp b/protocols/IcqOscarJ/src/fam_15icqserver.cpp
index 901b126891..c96e527c64 100644
--- a/protocols/IcqOscarJ/src/fam_15icqserver.cpp
+++ b/protocols/IcqOscarJ/src/fam_15icqserver.cpp
@@ -207,31 +207,27 @@ void CIcqProto::handleExtensionMetaResponse(BYTE *databuf, size_t wPacketLen, WO
// Todo: This overlaps with META_SET_AFFINFO_ACK.
// Todo: Check what happens if result != A
if (wPacketLen > 8) {
- WORD wNetworkNameLen;
- WORD wAckLen;
- char *pszInfo;
-
databuf += 6; // Some unknowns
wPacketLen -= 6;
+ size_t wNetworkNameLen, wAckLen;
unpackWord(&databuf, &wNetworkNameLen);
if (wPacketLen >= (wNetworkNameLen + 2)) {
databuf += wNetworkNameLen;
wPacketLen -= wNetworkNameLen;
unpackWord(&databuf, &wAckLen);
- if (pszInfo = (char *)_alloca(wAckLen + 1)) {
- // Terminate buffer
- if (wAckLen > 0)
- memcpy(pszInfo, databuf, wAckLen);
- pszInfo[wAckLen] = 0;
+ char *pszInfo = (char*)_alloca(wAckLen + 1);
+ // Terminate buffer
+ if (wAckLen > 0)
+ memcpy(pszInfo, databuf, wAckLen);
+ pszInfo[wAckLen] = 0;
- ProtoBroadcastAck(NULL, ICQACKTYPE_SMS, ACKRESULT_SENTREQUEST, (HANDLE)wCookie, (LPARAM)pszInfo);
- FreeCookie(wCookie);
+ ProtoBroadcastAck(NULL, ICQACKTYPE_SMS, ACKRESULT_SENTREQUEST, (HANDLE)wCookie, (LPARAM)pszInfo);
+ FreeCookie(wCookie);
- // Parsing success
- break;
- }
+ // Parsing success
+ break;
}
}