summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdbx
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-12-26 17:06:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-12-26 17:06:04 +0300
commit1039b2829a264280493ba0fa979214fe024dc70c (patch)
tree8fa6a60eb46627582c372b56a4a1d4754d6732c3 /plugins/Dbx_mdbx
parent62a186697df33c96dc1a6dac0f4dfc38652fb96f (diff)
WORD -> uint16_t
Diffstat (limited to 'plugins/Dbx_mdbx')
-rw-r--r--plugins/Dbx_mdbx/src/dbintf.h2
-rw-r--r--plugins/Dbx_mdbx/src/dbsettings.cpp14
2 files changed, 8 insertions, 8 deletions
diff --git a/plugins/Dbx_mdbx/src/dbintf.h b/plugins/Dbx_mdbx/src/dbintf.h
index 47be0cc7c2..b85559e33d 100644
--- a/plugins/Dbx_mdbx/src/dbintf.h
+++ b/plugins/Dbx_mdbx/src/dbintf.h
@@ -98,7 +98,7 @@ struct DBSettingValue
union
{
uint8_t bVal;
- WORD wVal;
+ uint16_t wVal;
DWORD dwVal;
char szVal[];
diff --git a/plugins/Dbx_mdbx/src/dbsettings.cpp b/plugins/Dbx_mdbx/src/dbsettings.cpp
index 103bcfb636..737a2d607b 100644
--- a/plugins/Dbx_mdbx/src/dbsettings.cpp
+++ b/plugins/Dbx_mdbx/src/dbsettings.cpp
@@ -49,17 +49,17 @@ void CDbxMDBX::FillSettings()
if (dbv == nullptr) // garbage! a setting for removed/non-existent contact
continue;
- WORD varLen;
+ uint16_t varLen;
uint8_t iType = dbv->type = pBlob[0]; pBlob++;
switch (iType) {
case DBVT_BYTE: dbv->bVal = *pBlob; break;
- case DBVT_WORD: dbv->wVal = *(WORD*)pBlob; break;
+ case DBVT_WORD: dbv->wVal = *(uint16_t*)pBlob; break;
case DBVT_DWORD: dbv->dVal = *(DWORD*)pBlob; break;
case DBVT_UTF8:
case DBVT_ASCIIZ:
- varLen = *(WORD*)pBlob;
+ varLen = *(uint16_t*)pBlob;
pBlob += 2;
dbv->pszVal = (char*)mir_alloc(1 + varLen);
memcpy(dbv->pszVal, pBlob, varLen);
@@ -68,7 +68,7 @@ void CDbxMDBX::FillSettings()
case DBVT_BLOB:
case DBVT_ENCRYPTED:
- varLen = *(WORD*)pBlob;
+ varLen = *(uint16_t*)pBlob;
pBlob += 2;
dbv->pbVal = (uint8_t *)mir_alloc(varLen);
memcpy(dbv->pbVal, pBlob, varLen);
@@ -117,19 +117,19 @@ BOOL CDbxMDBX::WriteContactSettingWorker(MCONTACT contactID, DBCONTACTWRITESETTI
*pBlob++ = dbcws.value.type;
switch (dbcws.value.type) {
case DBVT_BYTE: *pBlob = dbcws.value.bVal; break;
- case DBVT_WORD: *(WORD*)pBlob = dbcws.value.wVal; break;
+ case DBVT_WORD: *(uint16_t*)pBlob = dbcws.value.wVal; break;
case DBVT_DWORD: *(DWORD*)pBlob = dbcws.value.dVal; break;
case DBVT_ASCIIZ:
case DBVT_UTF8:
- *(WORD*)pBlob = dbcws.value.cchVal;
+ *(uint16_t*)pBlob = dbcws.value.cchVal;
pBlob += 2;
memcpy(pBlob, dbcws.value.pszVal, dbcws.value.cchVal);
break;
case DBVT_BLOB:
case DBVT_ENCRYPTED:
- *(WORD*)pBlob = dbcws.value.cpbVal;
+ *(uint16_t*)pBlob = dbcws.value.cpbVal;
pBlob += 2;
memcpy(pBlob, dbcws.value.pbVal, dbcws.value.cpbVal);
}