From cddcd7483a7c472598af098e759e5d309024f606 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 26 Dec 2021 20:31:39 +0300 Subject: DWORD -> uint32_t --- protocols/Tox/libtox/src/toxcore/network.c | 4 ++-- protocols/Tox/src/tox_bootstrap.cpp | 2 +- protocols/Tox/src/tox_contacts.cpp | 4 ++-- protocols/Tox/src/tox_proto.h | 2 +- protocols/Tox/src/tox_utils.cpp | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) (limited to 'protocols/Tox') diff --git a/protocols/Tox/libtox/src/toxcore/network.c b/protocols/Tox/libtox/src/toxcore/network.c index 3efa3283e9..88b4695a21 100644 --- a/protocols/Tox/libtox/src/toxcore/network.c +++ b/protocols/Tox/libtox/src/toxcore/network.c @@ -117,7 +117,7 @@ static const char *inet_ntop4(const struct in_addr *addr, char *buf, size_t bufs saddr.sin_family = AF_INET; saddr.sin_addr = *addr; - DWORD len = bufsize; + uint32_t len = bufsize; if (WSAAddressToString((LPSOCKADDR)&saddr, sizeof(saddr), nullptr, buf, &len)) { return nullptr; @@ -133,7 +133,7 @@ static const char *inet_ntop6(const struct in6_addr *addr, char *buf, size_t buf saddr.sin6_family = AF_INET6; saddr.sin6_addr = *addr; - DWORD len = bufsize; + uint32_t len = bufsize; if (WSAAddressToString((LPSOCKADDR)&saddr, sizeof(saddr), nullptr, buf, &len)) { return nullptr; diff --git a/protocols/Tox/src/tox_bootstrap.cpp b/protocols/Tox/src/tox_bootstrap.cpp index 638d3aadfe..663e46a8ab 100644 --- a/protocols/Tox/src/tox_bootstrap.cpp +++ b/protocols/Tox/src/tox_bootstrap.cpp @@ -132,7 +132,7 @@ void CToxProto::UpdateNodes() return; } - DWORD lastUpdate = root.at("last_scan").as_int(); + uint32_t lastUpdate = root.at("last_scan").as_int(); if (lastUpdate <= getDword("NodesUpdate", 0)) return; diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp index 7f80531fee..be5fd11d3c 100644 --- a/protocols/Tox/src/tox_contacts.cpp +++ b/protocols/Tox/src/tox_contacts.cpp @@ -14,9 +14,9 @@ void CToxProto::SetContactStatus(MCONTACT hContact, uint16_t status) MCONTACT CToxProto::GetContactFromAuthEvent(MEVENT hEvent) { - DWORD body[3]; + uint32_t body[3]; DBEVENTINFO dbei = {}; - dbei.cbBlob = sizeof(DWORD) * 2; + dbei.cbBlob = sizeof(uint32_t) * 2; dbei.pBlob = (uint8_t*)&body; if (db_event_get(hEvent, &dbei)) diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h index e3713c9de6..22efa4f6e1 100644 --- a/protocols/Tox/src/tox_proto.h +++ b/protocols/Tox/src/tox_proto.h @@ -236,7 +236,7 @@ private: static bool IsFileExists(const wchar_t* path); - MEVENT AddEventToDb(MCONTACT hContact, uint16_t type, DWORD timestamp, DWORD flags, uint8_t *pBlob, size_t cbBlob); + MEVENT AddEventToDb(MCONTACT hContact, uint16_t type, uint32_t timestamp, uint32_t flags, uint8_t *pBlob, size_t cbBlob); }; struct CMPlugin : public ACCPROTOPLUGIN diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp index 4620f5726c..b6892e7114 100644 --- a/protocols/Tox/src/tox_utils.cpp +++ b/protocols/Tox/src/tox_utils.cpp @@ -126,13 +126,13 @@ bool CToxProto::IsFileExists(const wchar_t* path) return _waccess(path, 0) == 0; } -MEVENT CToxProto::AddEventToDb(MCONTACT hContact, uint16_t type, DWORD timestamp, DWORD flags, uint8_t *pBlob, size_t cbBlob) +MEVENT CToxProto::AddEventToDb(MCONTACT hContact, uint16_t type, uint32_t timestamp, uint32_t flags, uint8_t *pBlob, size_t cbBlob) { DBEVENTINFO dbei = {}; dbei.szModule = this->m_szModuleName; dbei.timestamp = timestamp; dbei.eventType = type; - dbei.cbBlob = (DWORD)cbBlob; + dbei.cbBlob = (uint32_t)cbBlob; dbei.pBlob = pBlob; dbei.flags = flags; return db_event_add(hContact, &dbei); -- cgit v1.2.3