From fcbb395dc7ff3edab972b6d4b27dbbfb3305f5d7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 26 Dec 2021 15:58:40 +0300 Subject: PBYTE -> uint8_t* --- plugins/Import/src/dbrw/dbevents.cpp | 2 +- plugins/Import/src/import.cpp | 4 ++-- plugins/Import/src/patterns.cpp | 2 +- plugins/Import/src/textjson.cpp | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/Import/src') diff --git a/plugins/Import/src/dbrw/dbevents.cpp b/plugins/Import/src/dbrw/dbevents.cpp index 92e100737d..fb7f3c66bd 100644 --- a/plugins/Import/src/dbrw/dbevents.cpp +++ b/plugins/Import/src/dbrw/dbevents.cpp @@ -88,7 +88,7 @@ STDMETHODIMP_(BOOL) CDbxSQLite::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei) DWORD cbBlob = sqlite3_column_int(stmt, 5); size_t bytesToCopy = cbBlob; if (dbei->cbBlob == -1) - dbei->pBlob = (PBYTE)mir_calloc(cbBlob + 2); + dbei->pBlob = (uint8_t*)mir_calloc(cbBlob + 2); else if (dbei->cbBlob < cbBlob) bytesToCopy = dbei->cbBlob; diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index ca3e78f33c..1dccf81d41 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -880,7 +880,7 @@ void CImportBatch::ImportHistory(MCONTACT hContact, PROTOACCOUNT **protocol, int bool bSkipAll = false; DWORD cbAlloc = 4096; - BYTE *eventBuf = (PBYTE)mir_alloc(cbAlloc); + BYTE *eventBuf = (uint8_t*)mir_alloc(cbAlloc); // Get the start of the event chain int i = 0; @@ -893,7 +893,7 @@ void CImportBatch::ImportHistory(MCONTACT hContact, PROTOACCOUNT **protocol, int dbei.cbBlob = srcDb->GetBlobSize(hEvent); if (dbei.cbBlob > cbAlloc) { cbAlloc = dbei.cbBlob + 4096 - dbei.cbBlob % 4096; - eventBuf = (PBYTE)mir_realloc(eventBuf, cbAlloc); + eventBuf = (uint8_t*)mir_realloc(eventBuf, cbAlloc); } dbei.pBlob = eventBuf; diff --git a/plugins/Import/src/patterns.cpp b/plugins/Import/src/patterns.cpp index 74fb9620dc..eda1d988c8 100644 --- a/plugins/Import/src/patterns.cpp +++ b/plugins/Import/src/patterns.cpp @@ -567,7 +567,7 @@ public: dbei->timestamp = RLInteger(&pMsg[0x12]); dbei->timestamp -= TimeZone_ToLocal(dbei->timestamp) - dbei->timestamp; // deduct time zone offset from timestamp dbei->cbBlob = RLWord(&pMsg[m_iMsgHeaderSize - 2]); - dbei->pBlob = (PBYTE)mir_alloc(dbei->cbBlob + 1); + dbei->pBlob = (uint8_t*)mir_alloc(dbei->cbBlob + 1); memcpy(dbei->pBlob, pMsg + m_iMsgHeaderSize, dbei->cbBlob); if (m_iFileVersion != 1) for (int i = 0; i < dbei->cbBlob; i++) { diff --git a/plugins/Import/src/textjson.cpp b/plugins/Import/src/textjson.cpp index 06d5cd50ea..c6cb30efb9 100644 --- a/plugins/Import/src/textjson.cpp +++ b/plugins/Import/src/textjson.cpp @@ -171,7 +171,7 @@ public: buf.append(&tmp, 1); dbei->cbBlob = (int)buf.length(); - dbei->pBlob = (PBYTE)mir_alloc(dbei->cbBlob); + dbei->pBlob = (uint8_t*)mir_alloc(dbei->cbBlob); memcpy(dbei->pBlob, buf.data(), buf.length()); } else { @@ -194,7 +194,7 @@ public: dbei->flags |= DBEF_UTF; dbei->cbBlob = (DWORD)szBody.size() + offset; - dbei->pBlob = (PBYTE)mir_calloc(dbei->cbBlob + 1); + dbei->pBlob = (uint8_t*)mir_calloc(dbei->cbBlob + 1); memcpy(dbei->pBlob + offset, szBody.c_str(), szBody.size()); dbei->pBlob[dbei->cbBlob] = 0; } -- cgit v1.2.3