diff options
author | George Hazan <ghazan@miranda.im> | 2021-12-26 17:06:04 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-12-26 17:06:04 +0300 |
commit | 1039b2829a264280493ba0fa979214fe024dc70c (patch) | |
tree | 8fa6a60eb46627582c372b56a4a1d4754d6732c3 /plugins/CountryFlags/src/ip2country.cpp | |
parent | 62a186697df33c96dc1a6dac0f4dfc38652fb96f (diff) |
WORD -> uint16_t
Diffstat (limited to 'plugins/CountryFlags/src/ip2country.cpp')
-rw-r--r-- | plugins/CountryFlags/src/ip2country.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/CountryFlags/src/ip2country.cpp b/plugins/CountryFlags/src/ip2country.cpp index ec834a22e1..6f3b2c6901 100644 --- a/plugins/CountryFlags/src/ip2country.cpp +++ b/plugins/CountryFlags/src/ip2country.cpp @@ -24,7 +24,7 @@ extern struct CountryListEntry *countries; /************************* Bin Records ****************************/
-#define DATARECORD_SIZE (sizeof(DWORD)+sizeof(DWORD)+sizeof(WORD))
+#define DATARECORD_SIZE (sizeof(DWORD)+sizeof(DWORD)+sizeof(uint16_t))
// mir_free() the return value
static uint8_t* GetDataHeader(uint8_t *data, DWORD cbDataSize, DWORD *pnDataRecordCount)
@@ -45,7 +45,7 @@ static int GetDataRecord(uint8_t *data, DWORD index, DWORD *pdwFrom, DWORD *pdwT data += sizeof(DWORD);
if (pdwTo != nullptr) *pdwTo = *(DWORD*)data;
data += sizeof(DWORD);
- return (int)*(WORD*)data;
+ return (int)*(uint16_t*)data;
}
/************************* Record Cache ***************************/
@@ -185,7 +185,7 @@ static int EnumIpDataLines(const char *pszFileCSV, const char *pszFileOut) char line[1024], out[512], *pszFrom, *pszTo, *pszTwo, *pszCountry, *buf;
int i, j;
DWORD dwOut;
- WORD wOut;
+ uint16_t wOut;
struct ResizableByteBuffer buffer;
memset(&buffer, 0, sizeof(buffer));
@@ -237,8 +237,8 @@ static int EnumIpDataLines(const char *pszFileCSV, const char *pszFileOut) AppendToByteBuffer(&buffer, (void*)&dwOut, sizeof(DWORD));
dwOut = (DWORD)atoi(pszTo);
AppendToByteBuffer(&buffer, (void*)&dwOut, sizeof(DWORD));
- wOut = (WORD)countries[i].id;
- AppendToByteBuffer(&buffer, (void*)&wOut, sizeof(WORD));
+ wOut = (uint16_t)countries[i].id;
+ AppendToByteBuffer(&buffer, (void*)&wOut, sizeof(uint16_t));
break;
}
}
|