From 7dad3543a2b848f6547b291f812c9643dc0b85f2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 30 Jun 2012 16:17:46 +0000 Subject: Variables moved to mir_* memory allocation routines git-svn-id: http://svn.miranda-ng.org/main/trunk@696 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Import/mirabilis.cpp | 2 +- plugins/Import/miranda.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/Import') diff --git a/plugins/Import/mirabilis.cpp b/plugins/Import/mirabilis.cpp index 1f032827af..3b6bbeeb6e 100644 --- a/plugins/Import/mirabilis.cpp +++ b/plugins/Import/mirabilis.cpp @@ -1056,7 +1056,7 @@ BOOL ImportExtendedMessage(DWORD dwOffset) // Convert timestamp dbei.timestamp = footer->timestamp + nUCTOffset; dbei.cbBlob = wLength; - dbei.pBlob = (PBYTE)calloc(wLength,1); + dbei.pBlob = (PBYTE)mir_calloc(wLength,1); CopyMemory(dbei.pBlob, pszText, dbei.cbBlob); dbei.pBlob[dbei.cbBlob - 1] = 0; diff --git a/plugins/Import/miranda.cpp b/plugins/Import/miranda.cpp index e83eaae869..220f902467 100644 --- a/plugins/Import/miranda.cpp +++ b/plugins/Import/miranda.cpp @@ -478,7 +478,7 @@ struct DBHeader* GetHeader(HANDLE hDbFile) struct DBHeader* pdbHeader; DWORD dwBytesRead; - if (( pdbHeader = (DBHeader*)calloc(1, sizeof(struct DBHeader))) == NULL ) + if (( pdbHeader = (DBHeader*)mir_calloc(1, sizeof(struct DBHeader))) == NULL ) return NULL; // Goto start of file @@ -675,7 +675,7 @@ BOOL GetSettingsGroup(HANDLE hDbFile, DWORD dwOffset, struct DBContactSettings** // ** Read the struct and the following blob dwBlobSize = pSettings.cbBlob; - if (!(*pDbSettings = (DBContactSettings *)calloc(1, sizeof(struct DBContactSettings) + dwBlobSize))) + if (!(*pDbSettings = (DBContactSettings *)mir_calloc(1, sizeof(struct DBContactSettings) + dwBlobSize))) return FALSE; memcpy(*pDbSettings, &pSettings, dwHead ); @@ -772,7 +772,7 @@ int GetSettingValue(char* pBlob, DBVARIANT* dbv) { #ifdef _LOGGING { - char* pszName = calloc((*pBlob)+1, 1); + char* pszName = mir_calloc((*pBlob)+1, 1); memcpy(pszName, pBlob+1, *pBlob); AddMessage( LPGEN("Getting type %u value for setting: %s"), (BYTE)*(pBlob+(*pBlob)+1), pszName ); free(pszName); @@ -800,7 +800,7 @@ int GetSettingValue(char* pBlob, DBVARIANT* dbv) case DBVT_ASCIIZ: case DBVT_UTF8: dbv->cchVal = *(WORD*)pBlob; - dbv->pszVal = (char *)calloc( dbv->cchVal+1, sizeof( char )); + dbv->pszVal = (char *)mir_calloc( dbv->cchVal+1, sizeof( char )); memcpy( dbv->pszVal, pBlob+2, dbv->cchVal ); dbv->pszVal[ dbv->cchVal ] = 0; return TRUE; @@ -808,7 +808,7 @@ int GetSettingValue(char* pBlob, DBVARIANT* dbv) case DBVTF_VARIABLELENGTH: case DBVT_BLOB: dbv->cpbVal = *(WORD*)pBlob; - dbv->pbVal = (BYTE *)calloc( dbv->cpbVal+1, sizeof( char )); + dbv->pbVal = (BYTE *)mir_calloc( dbv->cpbVal+1, sizeof( char )); memcpy( dbv->pbVal, pBlob+2, dbv->cpbVal ); dbv->pbVal[ dbv->cpbVal ] = 0; return TRUE; -- cgit v1.2.3