summaryrefslogtreecommitdiff
path: root/protocols/Tox
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox')
-rw-r--r--protocols/Tox/src/tox_avatars.cpp4
-rw-r--r--protocols/Tox/src/tox_chatrooms.cpp2
-rw-r--r--protocols/Tox/src/tox_icons.cpp6
-rw-r--r--protocols/Tox/src/tox_multimedia.cpp10
-rw-r--r--protocols/Tox/src/tox_netlib.cpp2
-rw-r--r--protocols/Tox/src/tox_network.cpp2
-rw-r--r--protocols/Tox/src/tox_options.cpp10
-rw-r--r--protocols/Tox/src/tox_search.cpp8
-rw-r--r--protocols/Tox/src/tox_transfer.cpp2
9 files changed, 23 insertions, 23 deletions
diff --git a/protocols/Tox/src/tox_avatars.cpp b/protocols/Tox/src/tox_avatars.cpp
index a819f1bd3f..e8aab00e57 100644
--- a/protocols/Tox/src/tox_avatars.cpp
+++ b/protocols/Tox/src/tox_avatars.cpp
@@ -3,7 +3,7 @@
std::tstring CToxProto::GetAvatarFilePath(MCONTACT hContact)
{
TCHAR path[MAX_PATH];
- mir_sntprintf(path, _countof(path), _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
+ mir_sntprintf(path, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
DWORD dwAttributes = GetFileAttributes(path);
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
@@ -229,7 +229,7 @@ void CToxProto::OnGotFriendAvatarInfo(AvatarTransferParam *transfer)
}
TCHAR path[MAX_PATH];
- mir_sntprintf(path, _countof(path), _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
+ mir_sntprintf(path, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
OnFileAllow(transfer->pfts.hContact, transfer, path);
}
diff --git a/protocols/Tox/src/tox_chatrooms.cpp b/protocols/Tox/src/tox_chatrooms.cpp
index a0363afd5f..ae7ef71ada 100644
--- a/protocols/Tox/src/tox_chatrooms.cpp
+++ b/protocols/Tox/src/tox_chatrooms.cpp
@@ -29,7 +29,7 @@ MCONTACT CToxProto::AddChatRoom(int groupNumber)
setWord(hContact, TOX_SETTINGS_CHAT_ID, groupNumber);
TCHAR title[MAX_PATH];
- mir_sntprintf(title, _countof(title), _T("%s #%d"), TranslateT("Groupchat"), groupNumber);
+ mir_sntprintf(title, _T("%s #%d"), TranslateT("Groupchat"), groupNumber);
setTString(hContact, "Nick", title);
DBVARIANT dbv;
diff --git a/protocols/Tox/src/tox_icons.cpp b/protocols/Tox/src/tox_icons.cpp
index 3bb4302513..756fc13bad 100644
--- a/protocols/Tox/src/tox_icons.cpp
+++ b/protocols/Tox/src/tox_icons.cpp
@@ -23,10 +23,10 @@ void CToxProto::InitIcons()
sid.pszName = szSettingName;
sid.section.t = szSectionName;
- mir_sntprintf(szSectionName, _countof(szSectionName), _T("%s/%s"), LPGENT("Protocols"), LPGENT(MODULE));
+ mir_sntprintf(szSectionName, _T("%s/%s"), LPGENT("Protocols"), LPGENT(MODULE));
for (int i = 0; i < _countof(Icons); i++)
{
- mir_snprintf(szSettingName, _countof(szSettingName), "%s_%s", MODULE, Icons[i].Name);
+ mir_snprintf(szSettingName, "%s_%s", MODULE, Icons[i].Name);
sid.description.t = Icons[i].Description;
sid.iDefaultIndex = -Icons[i].IconId;
@@ -55,7 +55,7 @@ HANDLE CToxProto::GetIconHandle(const char *name)
HANDLE CToxProto::Skin_GetIconHandle(const char *name)
{
char iconName[100];
- mir_snprintf(iconName, _countof(iconName), "%s_%s", MODULE, name);
+ mir_snprintf(iconName, "%s_%s", MODULE, name);
HANDLE hIcon = IcoLib_GetIconHandle(iconName);
if (hIcon == NULL)
hIcon = GetIconHandle(name);
diff --git a/protocols/Tox/src/tox_multimedia.cpp b/protocols/Tox/src/tox_multimedia.cpp
index 7fa7a9c7b8..d24a5df474 100644
--- a/protocols/Tox/src/tox_multimedia.cpp
+++ b/protocols/Tox/src/tox_multimedia.cpp
@@ -27,7 +27,7 @@ INT_PTR CToxCallDlgBase::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
void CToxCallDlgBase::SetIcon(const char *name)
{
char iconName[100];
- mir_snprintf(iconName, _countof(iconName), "%s_%s", MODULE, name);
+ mir_snprintf(iconName, "%s_%s", MODULE, name);
SendMessage(m_hwnd, WM_SETICON, ICON_BIG, (LPARAM)IcoLib_GetIcon(iconName, false));
SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)IcoLib_GetIcon(iconName, true));
}
@@ -56,7 +56,7 @@ void CToxIncomingCall::OnInitDialog()
from.SetText(nick);
TCHAR title[MAX_PATH];
- mir_sntprintf(title, _countof(title), TranslateT("Incoming call from %s"), nick);
+ mir_sntprintf(title, TranslateT("Incoming call from %s"), nick);
SetTitle(title);
SetIcon("audio_ring");
}
@@ -98,7 +98,7 @@ void CToxOutgoingCall::OnInitDialog()
to.SetText(nick);
TCHAR title[MAX_PATH];
- mir_sntprintf(title, _countof(title), TranslateT("Outgoing call to %s"), nick);
+ mir_sntprintf(title, TranslateT("Outgoing call to %s"), nick);
SetTitle(title);
SetIcon("audio_end");
}
@@ -290,7 +290,7 @@ void CToxProto::OnAvInvite(void*, int32_t callId, void *arg)
}
TCHAR message[MAX_PATH];
- mir_sntprintf(message, _countof(message), TranslateT("Incoming call from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_sntprintf(message, TranslateT("Incoming call from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
T2Utf szMessage(message);
PROTORECVEVENT recv = { 0 };
@@ -317,7 +317,7 @@ INT_PTR CToxProto::OnRecvAudioCall(WPARAM hContact, LPARAM lParam)
cle.hIcon = IcoLib_GetIconByHandle(GetIconHandle("audio_ring"));
TCHAR szTooltip[MAX_PATH];
- mir_sntprintf(szTooltip, _countof(szTooltip), TranslateT("Incoming call from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_sntprintf(szTooltip, TranslateT("Incoming call from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
cle.ptszTooltip = szTooltip;
char szService[MAX_PATH];
diff --git a/protocols/Tox/src/tox_netlib.cpp b/protocols/Tox/src/tox_netlib.cpp
index b08bc7ddf9..4c1ae3e09f 100644
--- a/protocols/Tox/src/tox_netlib.cpp
+++ b/protocols/Tox/src/tox_netlib.cpp
@@ -3,7 +3,7 @@
void CToxProto::InitNetlib()
{
wchar_t name[128];
- mir_sntprintf(name, _countof(name), TranslateT("%s connection"), m_tszUserName);
+ mir_sntprintf(name, TranslateT("%s connection"), m_tszUserName);
NETLIBUSER nlu = {0};
nlu.cbSize = sizeof(nlu);
diff --git a/protocols/Tox/src/tox_network.cpp b/protocols/Tox/src/tox_network.cpp
index e8fa7ef88d..84db80e7c3 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, _countof(module), "%s_Nodes", m_szModuleName);
+ mir_snprintf(module, "%s_Nodes", m_szModuleName);
int nodeCount = db_get_w(NULL, module, TOX_SETTINGS_NODE_COUNT, 0);
if (nodeCount > 0)
{
diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp
index 7376bd02e0..0e9ccafc6b 100644
--- a/protocols/Tox/src/tox_options.cpp
+++ b/protocols/Tox/src/tox_options.cpp
@@ -109,7 +109,7 @@ void CToxOptionsMain::ProfileCreate_OnClick(CCtrlButton*)
void CToxOptionsMain::ProfileImport_OnClick(CCtrlButton*)
{
TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, _countof(filter), _T("%s(*.tox)%c*.tox%c%s(*.*)%c*.*%c%c"),
+ mir_sntprintf(filter, _T("%s(*.tox)%c*.tox%c%s(*.*)%c*.*%c%c"),
TranslateT("Tox profile"), 0, 0, TranslateT("All files"), 0, 0, 0);
TCHAR profilePath[MAX_PATH] = { 0 };
@@ -141,7 +141,7 @@ void CToxOptionsMain::ProfileImport_OnClick(CCtrlButton*)
void CToxOptionsMain::ProfileExport_OnClick(CCtrlButton*)
{
TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, _countof(filter), _T("%s(*.tox)%c*.tox%c%c"),
+ mir_sntprintf(filter, _T("%s(*.tox)%c*.tox%c%c"),
TranslateT("Tox profile"), 0, 0, 0);
TCHAR profilePath[MAX_PATH];
@@ -195,7 +195,7 @@ CToxOptionsMultimedia::CToxOptionsMultimedia(CToxProto *proto)
bool CToxOptionsMultimedia::GetDeviceFullName(GUID guid, TCHAR *deviceName, DWORD deviceNameLength)
{
TCHAR registryKey[MAX_PATH];
- mir_sntprintf(registryKey, _countof(registryKey), _T("System\\CurrentControlSet\\Control\\MediaCategories\\{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}"),
+ mir_sntprintf(registryKey, _T("System\\CurrentControlSet\\Control\\MediaCategories\\{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}"),
guid.Data1, guid.Data2, guid.Data3, guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]);
HKEY hKey;
@@ -424,7 +424,7 @@ void CToxOptionsNodeList::OnInitDialog()
}
char module[MAX_PATH], setting[MAX_PATH];
- mir_snprintf(module, _countof(module), "%s_Nodes", m_proto->m_szModuleName);
+ mir_snprintf(module, "%s_Nodes", m_proto->m_szModuleName);
int nodeCount = db_get_w(NULL, module, TOX_SETTINGS_NODE_COUNT, 0);
for (int i = 0; i < nodeCount; i++)
{
@@ -530,7 +530,7 @@ void CToxOptionsNodeList::OnApply()
lvi.pszText = (TCHAR*)mir_alloc(MAX_PATH * sizeof(TCHAR));
char module[MAX_PATH];
- mir_snprintf(module, _countof(module), "%s_Nodes", m_proto->m_szModuleName);
+ mir_snprintf(module, "%s_Nodes", m_proto->m_szModuleName);
int iItem = 0;
int itemCount = m_nodes.GetItemCount();
diff --git a/protocols/Tox/src/tox_search.cpp b/protocols/Tox/src/tox_search.cpp
index eee0c009d4..33479ba034 100644
--- a/protocols/Tox/src/tox_search.cpp
+++ b/protocols/Tox/src/tox_search.cpp
@@ -95,7 +95,7 @@ void CToxProto::SearchByNameAsync(void *arg)
{
dnsString[length] = 0;
char dnsQuery[MAX_PATH * 2];
- mir_snprintf(dnsQuery, _countof(dnsQuery), "_%s._tox.%s", dnsString, dnsDomain);
+ mir_snprintf(dnsQuery, "_%s._tox.%s", dnsString, dnsDomain);
ToxHexAddress address = ResolveToxAddressFromDns(dnsQuery);
if (!address.IsEmpty())
@@ -106,7 +106,7 @@ void CToxProto::SearchByNameAsync(void *arg)
psr.nick.a = mir_strdup(name);
char email[MAX_PATH];
- mir_snprintf(email, _countof(email), "%s@%s", name, domain);
+ mir_snprintf(email, "%s@%s", name, domain);
psr.email.a = mir_strdup(email);
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)1, (LPARAM)&psr);
@@ -123,7 +123,7 @@ void CToxProto::SearchByNameAsync(void *arg)
if (resolved == 0 && domain)
{
char dnsQuery[MAX_PATH];
- mir_snprintf(dnsQuery, _countof(dnsQuery), "%s._tox.%s", name, domain);
+ mir_snprintf(dnsQuery, "%s._tox.%s", name, domain);
ToxHexAddress address = ResolveToxAddressFromDns(dnsQuery);
if (!address.IsEmpty())
@@ -134,7 +134,7 @@ void CToxProto::SearchByNameAsync(void *arg)
psr.nick.a = mir_strdup(name);
char email[MAX_PATH];
- mir_snprintf(email, _countof(email), "%s@%s", name, domain);
+ mir_snprintf(email, "%s@%s", name, domain);
psr.email.a = mir_strdup(email);
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)1, (LPARAM)&psr);
diff --git a/protocols/Tox/src/tox_transfer.cpp b/protocols/Tox/src/tox_transfer.cpp
index 7b61637cff..da28e1f120 100644
--- a/protocols/Tox/src/tox_transfer.cpp
+++ b/protocols/Tox/src/tox_transfer.cpp
@@ -76,7 +76,7 @@ HANDLE CToxProto::OnFileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR *
// stupid fix
TCHAR fullPath[MAX_PATH];
- mir_sntprintf(fullPath, _countof(fullPath), _T("%s\\%s"), transfer->pfts.tszWorkingDir, transfer->pfts.tszCurrentFile);
+ mir_sntprintf(fullPath, _T("%s\\%s"), transfer->pfts.tszWorkingDir, transfer->pfts.tszCurrentFile);
transfer->ChangeName(fullPath);
if (!ProtoBroadcastAck(hContact, ACKTYPE_FILE, ACKRESULT_FILERESUME, (HANDLE)transfer, (LPARAM)&transfer->pfts))