diff options
author | George Hazan <ghazan@miranda.im> | 2021-12-26 15:58:40 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-12-26 15:58:40 +0300 |
commit | fcbb395dc7ff3edab972b6d4b27dbbfb3305f5d7 (patch) | |
tree | 8807aea6f2afce38b30ce60aa5ebf84a26992b73 /plugins/Spamotron/src | |
parent | af2958f2e82cb68392983da6f7f69fa3cd0c5276 (diff) |
PBYTE -> uint8_t*
Diffstat (limited to 'plugins/Spamotron/src')
-rw-r--r-- | plugins/Spamotron/src/spamotron.cpp | 8 | ||||
-rw-r--r-- | plugins/Spamotron/src/utils.cpp | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp index f61f1c43f5..d155dcd097 100644 --- a/plugins/Spamotron/src/spamotron.cpp +++ b/plugins/Spamotron/src/spamotron.cpp @@ -426,7 +426,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) if (g_plugin.getByte("KeepBlockedMsg", defaultKeepBlockedMsg)) {
if (dbei->eventType == EVENTTYPE_AUTHREQUEST) {
// Save the request to database so that it can be automatically submitted on user approval
- PBYTE eventdata = (PBYTE)malloc(sizeof(DWORD) + dbei->cbBlob);
+ uint8_t *eventdata = (uint8_t*)malloc(sizeof(DWORD) + dbei->cbBlob);
if (eventdata != nullptr && dbei->cbBlob > 0) {
memcpy(eventdata, &dbei->cbBlob, sizeof(DWORD));
memcpy(eventdata + sizeof(DWORD), dbei->pBlob, dbei->cbBlob);
@@ -440,11 +440,11 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) if (g_plugin.getByte("MarkMsgUnreadOnApproval", defaultMarkMsgUnreadOnApproval)) {
DBVARIANT _dbv;
DWORD dbei_size = 3 * sizeof(DWORD) + sizeof(WORD) + dbei->cbBlob + (DWORD)mir_strlen(dbei->szModule) + 1;
- PBYTE eventdata = (PBYTE)malloc(dbei_size);
- PBYTE pos = eventdata;
+ uint8_t *eventdata = (uint8_t*)malloc(dbei_size);
+ uint8_t *pos = eventdata;
if (eventdata != nullptr && dbei->cbBlob > 0) {
if (db_get(hContact, MODULENAME, "LastMsgEvents", &_dbv) == 0) {
- eventdata = (PBYTE)realloc(eventdata, dbei_size + _dbv.cpbVal);
+ eventdata = (uint8_t*)realloc(eventdata, dbei_size + _dbv.cpbVal);
pos = eventdata;
memcpy(eventdata, _dbv.pbVal, _dbv.cpbVal);
pos += _dbv.cpbVal;
diff --git a/plugins/Spamotron/src/utils.cpp b/plugins/Spamotron/src/utils.cpp index 52ba7ef5c4..d34d7ee5f7 100644 --- a/plugins/Spamotron/src/utils.cpp +++ b/plugins/Spamotron/src/utils.cpp @@ -465,7 +465,7 @@ int LogToSystemHistory(char *message, char *origmessage) DBEVENTINFO dbei = {}; dbei.timestamp = time(&tm); dbei.szModule = MODULENAME; - dbei.pBlob = (PBYTE)msg; + dbei.pBlob = (uint8_t*)msg; if (origmessage) dbei.cbBlob = (1 + mir_snprintf(msg, "%s: %s%s %s: %s", MODULENAME, message, DOT(message), Translate("Their message was"), origmessage)); else @@ -480,7 +480,7 @@ void MarkUnread(MCONTACT hContact) { // We're not actually marking anything. We just pushing saved events to the database from a temporary location DBVARIANT _dbv = {0}; - PBYTE pos; + uint8_t *pos; if (hContact == NULL) return; @@ -498,7 +498,7 @@ void MarkUnread(MCONTACT hContact) pos += mir_strlen((const char*)pos)+1; memcpy(&dbei.cbBlob, pos, sizeof(DWORD)); pos += sizeof(DWORD); - dbei.pBlob = (PBYTE)malloc(dbei.cbBlob); + dbei.pBlob = (uint8_t*)malloc(dbei.cbBlob); memcpy(dbei.pBlob, pos, dbei.cbBlob); pos += dbei.cbBlob; db_event_add(hContact,&dbei); |