summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src/dbsettings.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-22 10:06:32 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-22 10:06:32 +0000
commit5a17c9299e03bebf46169927abdeee34aaf8e854 (patch)
treecbd13080f33ac0b6396b9d3b8ba31a3c98de59f8 /plugins/Db3x_mmap/src/dbsettings.cpp
parented64312924e77707e7e5b5965c301692519f293a (diff)
replace strlen to mir_strlen
git-svn-id: http://svn.miranda-ng.org/main/trunk@13747 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap/src/dbsettings.cpp')
-rw-r--r--plugins/Db3x_mmap/src/dbsettings.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/Db3x_mmap/src/dbsettings.cpp b/plugins/Db3x_mmap/src/dbsettings.cpp
index 67bb0d72a2..bf8c494c60 100644
--- a/plugins/Db3x_mmap/src/dbsettings.cpp
+++ b/plugins/Db3x_mmap/src/dbsettings.cpp
@@ -62,8 +62,8 @@ int CDb3Mmap::GetContactSettingWorker(MCONTACT contactID, LPCSTR szModule, LPCST
return 1;
// the db format can't tolerate more than 255 bytes of space (incl. null) for settings+module name
- int settingNameLen = (int)strlen(szSetting);
- int moduleNameLen = (int)strlen(szModule);
+ int settingNameLen = (int)mir_strlen(szSetting);
+ int moduleNameLen = (int)mir_strlen(szModule);
if (settingNameLen > 0xFE) {
#ifdef _DEBUG
OutputDebugStringA("GetContactSettingWorker() got a > 255 setting name length. \n");
@@ -92,7 +92,7 @@ LBL_Seek:
if (isStatic) {
int cbLen = 0;
if (pCachedValue->pszVal != NULL)
- cbLen = (int)strlen(pCachedValue->pszVal);
+ cbLen = (int)mir_strlen(pCachedValue->pszVal);
cbOrigLen--;
dbv->pszVal = cbOrigPtr;
@@ -103,7 +103,7 @@ LBL_Seek:
dbv->cchVal = cbLen;
}
else {
- dbv->pszVal = (char*)mir_alloc(strlen(pCachedValue->pszVal) + 1);
+ dbv->pszVal = (char*)mir_alloc(mir_strlen(pCachedValue->pszVal) + 1);
strcpy(dbv->pszVal, pCachedValue->pszVal);
}
}
@@ -237,7 +237,7 @@ LBL_Seek:
if (cc && cc->IsMeta() && ValidLookupName(szModule, szSetting)) {
if (contactID = db_mc_getDefault(contactID)) {
if (szModule = GetContactProto(contactID)) {
- moduleNameLen = (int)strlen(szModule);
+ moduleNameLen = (int)mir_strlen(szModule);
goto LBL_Seek;
}
}
@@ -364,7 +364,7 @@ STDMETHODIMP_(BOOL) CDb3Mmap::FreeVariant(DBVARIANT *dbv)
STDMETHODIMP_(BOOL) CDb3Mmap::SetSettingResident(BOOL bIsResident, const char *pszSettingName)
{
- char *szSetting = m_cache->GetCachedSetting(NULL, pszSettingName, 0, (int)strlen(pszSettingName));
+ char *szSetting = m_cache->GetCachedSetting(NULL, pszSettingName, 0, (int)mir_strlen(pszSettingName));
szSetting[-1] = (char)bIsResident;
mir_cslock lck(m_csDbAccess);
@@ -385,8 +385,8 @@ STDMETHODIMP_(BOOL) CDb3Mmap::WriteContactSetting(MCONTACT contactID, DBCONTACTW
return 1;
// the db format can't tolerate more than 255 bytes of space (incl. null) for settings+module name
- int settingNameLen = (int)strlen(dbcws->szSetting);
- int moduleNameLen = (int)strlen(dbcws->szModule);
+ int settingNameLen = (int)mir_strlen(dbcws->szSetting);
+ int moduleNameLen = (int)mir_strlen(dbcws->szModule);
if (settingNameLen > 0xFE) {
#ifdef _DEBUG
OutputDebugStringA("WriteContactSetting() got a > 255 setting name length. \n");
@@ -408,7 +408,7 @@ STDMETHODIMP_(BOOL) CDb3Mmap::WriteContactSetting(MCONTACT contactID, DBCONTACTW
if (val == NULL)
return 1;
- dbcwNotif.value.pszVal = (char*)alloca(strlen(val) + 1);
+ dbcwNotif.value.pszVal = (char*)alloca(mir_strlen(val) + 1);
strcpy(dbcwNotif.value.pszVal, val);
mir_free(val);
dbcwNotif.value.type = DBVT_UTF8;
@@ -432,7 +432,7 @@ STDMETHODIMP_(BOOL) CDb3Mmap::WriteContactSetting(MCONTACT contactID, DBCONTACTW
LBL_WriteString:
if (dbcwWork.value.pszVal == NULL)
return 1;
- dbcwWork.value.cchVal = (WORD)strlen(dbcwWork.value.pszVal);
+ dbcwWork.value.cchVal = (WORD)mir_strlen(dbcwWork.value.pszVal);
if (bIsEncrypted) {
size_t len;
BYTE *pResult = m_crypto->encodeString(dbcwWork.value.pszVal, &len);
@@ -706,8 +706,8 @@ STDMETHODIMP_(BOOL) CDb3Mmap::DeleteContactSetting(MCONTACT contactID, LPCSTR sz
return 1;
// the db format can't tolerate more than 255 bytes of space (incl. null) for settings+module name
- int settingNameLen = (int)strlen(szSetting);
- int moduleNameLen = (int)strlen(szModule);
+ int settingNameLen = (int)mir_strlen(szSetting);
+ int moduleNameLen = (int)mir_strlen(szModule);
if (settingNameLen > 0xFE) {
#ifdef _DEBUG
OutputDebugStringA("DeleteContactSetting() got a > 255 setting name length. \n");