diff options
author | George Hazan <george.hazan@gmail.com> | 2014-12-18 12:14:49 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-12-18 12:14:49 +0000 |
commit | 413598d13f39669f93a7a2e0d515f91953aa8da0 (patch) | |
tree | 22c82bf1890c1863cd98f35e94a2a9686031d12b | |
parent | 4f36b966069e1a75c2c7783c16c8c169e02ce1d2 (diff) |
warning fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@11510 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/IcqOscarJ/src/icq_proto.cpp | 10 | ||||
-rw-r--r-- | protocols/Yahoo/src/libyahoo2/crypt.cpp | 9 |
2 files changed, 7 insertions, 12 deletions
diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp index 0227dd5ed1..7860b1190c 100644 --- a/protocols/IcqOscarJ/src/icq_proto.cpp +++ b/protocols/IcqOscarJ/src/icq_proto.cpp @@ -1163,7 +1163,7 @@ int __cdecl CIcqProto::SendContacts(MCONTACT hContact, int, int nContacts, MCONT char *pBody, *pBuffer = pBody = (char *)SAFE_MALLOC(nBodyLength);
null_strcpy(pBuffer, szCount, nBodyLength - 1);
pBuffer += mir_strlen(pBuffer);
- *pBuffer++ = char(0xFE);
+ *pBuffer++ = -2;
for (i = 0; i < nContacts; i++) {
if (contacts[i].uin) {
_itoa(contacts[i].uin, szContactUin, 10);
@@ -1172,10 +1172,10 @@ int __cdecl CIcqProto::SendContacts(MCONTACT hContact, int, int nContacts, MCONT else
strcpy(pBuffer, contacts[i].uid);
pBuffer += mir_strlen(pBuffer);
- *pBuffer++ = char(0xFE);
+ *pBuffer++ = -2;
strcpy(pBuffer, contacts[i].szNick);
pBuffer += mir_strlen(pBuffer);
- *pBuffer++ = char(0xFE);
+ *pBuffer++ = -2;
}
for (i = 0; i < nContacts; i++) { // release memory
@@ -1188,10 +1188,8 @@ int __cdecl CIcqProto::SendContacts(MCONTACT hContact, int, int nContacts, MCONT if (m_bDCMsgEnabled && IsDirectConnectionOpen(hContact, DIRECTCONN_STANDARD, 0)) {
int iRes = icq_SendDirectMessage(hContact, pBody, nBodyLength, pCookieData, NULL);
-
if (iRes) {
SAFE_FREE((void**)&pBody);
-
return iRes; // we succeded, return
}
}
@@ -1500,7 +1498,7 @@ int __cdecl CIcqProto::SendUrl(MCONTACT hContact, int, const char* url) size_t nBodyLen = nUrlLen + nDescLen + 2;
char *szBody = (char *)_alloca(nBodyLen);
strcpy(szBody, szDesc);
- szBody[nDescLen] = char(0xFE); // Separator
+ szBody[nDescLen] = -2; // Separator
strcpy(szBody + nDescLen + 1, url);
if (m_bDCMsgEnabled && IsDirectConnectionOpen(hContact, DIRECTCONN_STANDARD, 0)) {
diff --git a/protocols/Yahoo/src/libyahoo2/crypt.cpp b/protocols/Yahoo/src/libyahoo2/crypt.cpp index b54456fd85..29f22e96f9 100644 --- a/protocols/Yahoo/src/libyahoo2/crypt.cpp +++ b/protocols/Yahoo/src/libyahoo2/crypt.cpp @@ -47,14 +47,11 @@ static const char b64t[65] = char *yahoo_crypt(char *key, char *salt)
{
char *buffer = NULL;
- int buflen = 0;
- int needed = 3 + strlen (salt) + 1 + 26 + 1;
+ size_t buflen = 0, needed = 3 + strlen (salt) + 1 + 26 + 1;
BYTE alt_result[16];
mir_md5_state_t ctx;
mir_md5_state_t alt_ctx;
- int salt_len;
- int key_len;
int cnt;
char *cp;
@@ -70,8 +67,8 @@ char *yahoo_crypt(char *key, char *salt) /* Skip salt prefix. */
salt += sizeof (md5_salt_prefix) - 1;
- salt_len = (int)MIN (strcspn (salt, "$"), 8);
- key_len = (int)strlen (key);
+ int salt_len = (int)MIN(strcspn(salt, "$"), 8);
+ int key_len = (int)strlen(key);
/* Prepare for the real work. */
mir_md5_init(&ctx);
|