diff options
Diffstat (limited to 'protocols/Tox/src/tox_network.cpp')
-rw-r--r-- | protocols/Tox/src/tox_network.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/Tox/src/tox_network.cpp b/protocols/Tox/src/tox_network.cpp index 26958fbeef..e8fa7ef88d 100644 --- a/protocols/Tox/src/tox_network.cpp +++ b/protocols/Tox/src/tox_network.cpp @@ -20,7 +20,7 @@ void CToxProto::BootstrapNode(const char *address, int port, const char *hexKey) void CToxProto::BootstrapNodesFromDb(bool isIPv6)
{
char module[MAX_PATH];
- mir_snprintf(module, SIZEOF(module), "%s_Nodes", m_szModuleName);
+ mir_snprintf(module, _countof(module), "%s_Nodes", m_szModuleName);
int nodeCount = db_get_w(NULL, module, TOX_SETTINGS_NODE_COUNT, 0);
if (nodeCount > 0)
{
@@ -52,21 +52,21 @@ void CToxProto::BootstrapNodesFromIni(bool isIPv6) mir_strcpy(fileName, VARS(TOX_INI_PATH));
char *section, sections[MAX_PATH], value[MAX_PATH];
- GetPrivateProfileSectionNamesA(sections, SIZEOF(sections), fileName);
+ GetPrivateProfileSectionNamesA(sections, _countof(sections), fileName);
section = sections;
while (*section != NULL)
{
if (strstr(section, TOX_SETTINGS_NODE_PREFIX) == section)
{
- GetPrivateProfileStringA(section, "IPv4", NULL, value, SIZEOF(value), fileName);
+ GetPrivateProfileStringA(section, "IPv4", NULL, value, _countof(value), fileName);
ptrA address(mir_strdup(value));
int port = GetPrivateProfileIntA(section, "Port", 33445, fileName);
- GetPrivateProfileStringA(section, "PubKey", NULL, value, SIZEOF(value), fileName);
+ GetPrivateProfileStringA(section, "PubKey", NULL, value, _countof(value), fileName);
ptrA pubKey(mir_strdup(value));
BootstrapNode(address, port, pubKey);
if (isIPv6)
{
- GetPrivateProfileStringA(section, "IPv6", NULL, value, SIZEOF(value), fileName);
+ GetPrivateProfileStringA(section, "IPv6", NULL, value, _countof(value), fileName);
address = mir_strdup(value);
BootstrapNode(address, port, pubKey);
}
|