diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Variables/contact.cpp | 6 | ||||
-rw-r--r-- | plugins/Variables/help.cpp | 2 | ||||
-rw-r--r-- | plugins/Variables/parse_alias.cpp | 8 | ||||
-rw-r--r-- | plugins/Variables/parse_inet.cpp | 4 | ||||
-rw-r--r-- | plugins/Variables/parse_system.cpp | 2 | ||||
-rw-r--r-- | plugins/Variables/parse_variables.cpp | 4 | ||||
-rw-r--r-- | plugins/Variables/trigger_variables.cpp | 2 |
7 files changed, 14 insertions, 14 deletions
diff --git a/plugins/Variables/contact.cpp b/plugins/Variables/contact.cpp index 78c3cef67c..d2de7c5ace 100644 --- a/plugins/Variables/contact.cpp +++ b/plugins/Variables/contact.cpp @@ -484,7 +484,7 @@ int getContactFromString( CONTACTSINFO* ci ) }
}
if (bMatch) {
- ci->hContacts = ( HANDLE* )realloc(ci->hContacts, (count+1)*sizeof(HANDLE));
+ ci->hContacts = ( HANDLE* )mir_realloc(ci->hContacts, (count+1)*sizeof(HANDLE));
if (ci->hContacts == NULL) {
return -1;
@@ -497,7 +497,7 @@ int getContactFromString( CONTACTSINFO* ci ) if (count == 1) { /* cache the found result */
EnterCriticalSection(&csContactCache);
- cce = ( CONTACTCE* )realloc(cce, (cacheSize+1)*sizeof(CONTACTCE));
+ cce = ( CONTACTCE* )mir_realloc(cce, (cacheSize+1)*sizeof(CONTACTCE));
if (cce == NULL) {
LeaveCriticalSection(&csContactCache);
return count;
@@ -546,7 +546,7 @@ static int contactSettingChanged(WPARAM wParam, LPARAM lParam) mir_free(cce[i].tszContact);
if (cacheSize > 1) {
MoveMemory(&cce[i], &cce[cacheSize-1], sizeof(CONTACTCE));
- cce = ( CONTACTCE* )realloc(cce, (cacheSize-1)*sizeof(CONTACTCE));
+ cce = ( CONTACTCE* )mir_realloc(cce, (cacheSize-1)*sizeof(CONTACTCE));
cacheSize -= 1;
}
else {
diff --git a/plugins/Variables/help.cpp b/plugins/Variables/help.cpp index 0f214bdcea..be9e377c28 100644 --- a/plugins/Variables/help.cpp +++ b/plugins/Variables/help.cpp @@ -267,7 +267,7 @@ static TCHAR *getTokenCategory(TOKENREGISTEREX *tr) { while (*cur != _T('\0')) {
if (*cur == _T('\t')) {
*cur = _T('\0');
- helpText = ( char* )realloc(helpText, strlen(helpText)+1);
+ helpText = ( char* )mir_realloc(helpText, strlen(helpText)+1);
res = mir_a2t(helpText);
mir_free(helpText);
diff --git a/plugins/Variables/parse_alias.cpp b/plugins/Variables/parse_alias.cpp index 9c44a2f915..cdcef9ff17 100644 --- a/plugins/Variables/parse_alias.cpp +++ b/plugins/Variables/parse_alias.cpp @@ -62,7 +62,7 @@ static TCHAR *replaceArguments(TCHAR *res, TCHAR *tArg, TCHAR *rArg) { }
if ( ((signed int)_tcslen(tArg) == (ecur-cur)) && (!_tcsncmp(tArg, res+cur, _tcslen(tArg)))) {
if (_tcslen(rArg) > _tcslen(tArg)) {
- res = ( TCHAR* )realloc(res, (_tcslen(res) + (_tcslen(rArg)-_tcslen(tArg)) + 1)*sizeof(TCHAR));
+ res = ( TCHAR* )mir_realloc(res, (_tcslen(res) + (_tcslen(rArg)-_tcslen(tArg)) + 1)*sizeof(TCHAR));
if (res == NULL)
return NULL;
}
@@ -115,7 +115,7 @@ static int addToAliasRegister(TCHAR *szAlias, unsigned int argc, TCHAR** argv, T }
}
ar[i].argc = argc;
- ar[i].argv = ( TCHAR** )realloc(ar[i].argv, argc * sizeof(TCHAR *));
+ ar[i].argv = ( TCHAR** )mir_realloc(ar[i].argv, argc * sizeof(TCHAR *));
if (ar[i].argv == NULL) {
LeaveCriticalSection(&csAliasRegister);
return -1;
@@ -130,7 +130,7 @@ static int addToAliasRegister(TCHAR *szAlias, unsigned int argc, TCHAR** argv, T return 0;
}
}
- ar = ( ALIASREGISTER* )realloc(ar, (arCount+1)*sizeof(ALIASREGISTER));
+ ar = ( ALIASREGISTER* )mir_realloc(ar, (arCount+1)*sizeof(ALIASREGISTER));
if (ar == NULL) {
LeaveCriticalSection(&csAliasRegister);
return -1;
@@ -182,7 +182,7 @@ static TCHAR *parseAddAlias(ARGUMENTSINFO *ai) { if (i == 0)
szArgs = ( TCHAR* )mir_calloc(( _tcslen(argv[i])+2)*sizeof(TCHAR));
else
- szArgs = ( TCHAR* )realloc(szArgs, (_tcslen(szArgs) + _tcslen(argv[i]) + 2)*sizeof(TCHAR));
+ szArgs = ( TCHAR* )mir_realloc(szArgs, (_tcslen(szArgs) + _tcslen(argv[i]) + 2)*sizeof(TCHAR));
_tcscat(szArgs, argv[i]);
if (i != argc-1)
diff --git a/plugins/Variables/parse_inet.cpp b/plugins/Variables/parse_inet.cpp index dce4fa76a4..12db607b99 100644 --- a/plugins/Variables/parse_inet.cpp +++ b/plugins/Variables/parse_inet.cpp @@ -41,7 +41,7 @@ static TCHAR *parseUrlEnc(ARGUMENTSINFO *ai) { cur++;
continue;
}
- res = ( char* )realloc(res, strlen(res)+4);
+ res = ( char* )mir_realloc(res, strlen(res)+4);
if (res == NULL)
return NULL;
@@ -83,7 +83,7 @@ static TCHAR *parseUrlDec(ARGUMENTSINFO *ai) { }
cur++;
}
- res = ( char* )realloc(res, strlen(res)+1);
+ res = ( char* )mir_realloc(res, strlen(res)+1);
tres = mir_a2t(res);
diff --git a/plugins/Variables/parse_system.cpp b/plugins/Variables/parse_system.cpp index a733f8ba25..8acfd174b0 100644 --- a/plugins/Variables/parse_system.cpp +++ b/plugins/Variables/parse_system.cpp @@ -863,7 +863,7 @@ static TCHAR *parseTextFile(ARGUMENTSINFO *ai) { pCur -= csz;
}
icur = pCur - pBuf;
- pBuf = ( PBYTE )realloc(pBuf, bufSz);
+ pBuf = ( PBYTE )mir_realloc(pBuf, bufSz);
pCur = pBuf+icur;
ZeroMemory(pCur+1, TXTFILEBUFSZ*csz);
}
diff --git a/plugins/Variables/parse_variables.cpp b/plugins/Variables/parse_variables.cpp index 8a4351fbbf..8b9bc57093 100644 --- a/plugins/Variables/parse_variables.cpp +++ b/plugins/Variables/parse_variables.cpp @@ -41,7 +41,7 @@ static int addToVariablesRegister(TCHAR *szName, TCHAR *szText) { return 0;
}
}
- vr = ( VARIABLEREGISTER* )realloc(vr, (vrCount+1)*sizeof(VARIABLEREGISTER));
+ vr = ( VARIABLEREGISTER* )mir_realloc(vr, (vrCount+1)*sizeof(VARIABLEREGISTER));
if (vr == NULL) {
LeaveCriticalSection(&csVarRegister);
return -1;
@@ -89,7 +89,7 @@ int clearVariableRegister() { mir_free(vr[i].szText);
if (vrCount > 1) {
memcpy(&vr[i], &vr[vrCount-1], sizeof(VARIABLEREGISTER));
- vr = ( VARIABLEREGISTER* )realloc(vr, (vrCount-1)*sizeof(VARIABLEREGISTER));
+ vr = ( VARIABLEREGISTER* )mir_realloc(vr, (vrCount-1)*sizeof(VARIABLEREGISTER));
if (vr == NULL) {
LeaveCriticalSection(&csVarRegister);
return -1;
diff --git a/plugins/Variables/trigger_variables.cpp b/plugins/Variables/trigger_variables.cpp index 57ddfaff79..c7d8771fc0 100644 --- a/plugins/Variables/trigger_variables.cpp +++ b/plugins/Variables/trigger_variables.cpp @@ -41,7 +41,7 @@ static int addToCache(DWORD triggerID) { }
}
if (!DBGetTriggerSettingTString(triggerID, NULL, MODULENAME, SETTING_TRIGGERTEXT, &dbv)) {
- tvc = ( TRG_VAR_CACHE* )realloc(tvc, (tvcCount+1)*sizeof(TRG_VAR_CACHE));
+ tvc = ( TRG_VAR_CACHE* )mir_realloc(tvc, (tvcCount+1)*sizeof(TRG_VAR_CACHE));
if (tvc == NULL) {
return -1;
}
|