summaryrefslogtreecommitdiff
path: root/protocols/IRCG
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-12-01 04:50:22 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-12-01 04:50:22 +0000
commit41a7300678e4bb3cd703e2c236e57af4a31962c7 (patch)
tree36318f807498cf15b405eda5c451fd37bfe1b675 /protocols/IRCG
parent97e0ada5c34d6e7eba1cf47a8d8ac029197be6de (diff)
mir_snprintf(..., sizeof() -> SIZEOF(), ...)
small fixs cleanups git-svn-id: http://svn.miranda-ng.org/main/trunk@11188 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IRCG')
-rw-r--r--protocols/IRCG/src/clist.cpp2
-rw-r--r--protocols/IRCG/src/commandmonitor.cpp4
-rw-r--r--protocols/IRCG/src/ircproto.cpp2
-rw-r--r--protocols/IRCG/src/options.cpp12
4 files changed, 10 insertions, 10 deletions
diff --git a/protocols/IRCG/src/clist.cpp b/protocols/IRCG/src/clist.cpp
index a4b9913dc1..3dd962a4a3 100644
--- a/protocols/IRCG/src/clist.cpp
+++ b/protocols/IRCG/src/clist.cpp
@@ -67,7 +67,7 @@ BOOL CIrcProto::CList_AddDCCChat(const CMString& name, const CMString& hostmask,
cle.hDbEvent = (HANDLE)"dccchat";
cle.flags = CLEF_TCHAR;
cle.hIcon = LoadIconEx(IDI_DCC);
- mir_snprintf(szService, sizeof(szService), "%s/DblClickEvent", m_szModuleName);
+ mir_snprintf(szService, SIZEOF(szService), "%s/DblClickEvent", m_szModuleName);
cle.pszService = szService;
mir_sntprintf(szNick, SIZEOF(szNick), TranslateT("CTCP chat request from %s"), name.c_str());
cle.ptszTooltip = szNick;
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp
index 4c5236b898..d70529a159 100644
--- a/protocols/IRCG/src/commandmonitor.cpp
+++ b/protocols/IRCG/src/commandmonitor.cpp
@@ -246,9 +246,9 @@ void __cdecl CIrcProto::ResolveIPThread(LPVOID di)
IN_ADDR in;
memcpy(&in, myhost->h_addr, 4);
if (ipr->iType == IP_AUTO)
- mir_snprintf(m_myHost, sizeof(m_myHost), "%s", inet_ntoa(in));
+ mir_snprintf(m_myHost, SIZEOF(m_myHost), "%s", inet_ntoa(in));
else
- mir_snprintf(m_mySpecifiedHostIP, sizeof(m_mySpecifiedHostIP), "%s", inet_ntoa(in));
+ mir_snprintf(m_mySpecifiedHostIP, SIZEOF(m_mySpecifiedHostIP), "%s", inet_ntoa(in));
}
}
}
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp
index dfacc49281..a050bcba34 100644
--- a/protocols/IRCG/src/ircproto.cpp
+++ b/protocols/IRCG/src/ircproto.cpp
@@ -192,7 +192,7 @@ int CIrcProto::OnModulesLoaded(WPARAM, LPARAM)
nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_TCHAR;
char szTemp2[256];
- mir_snprintf(szTemp2, sizeof(szTemp2), "%s DCC", m_szModuleName);
+ mir_snprintf(szTemp2, SIZEOF(szTemp2), "%s DCC", m_szModuleName);
nlu.szSettingsModule = szTemp2;
mir_sntprintf(name, SIZEOF(name), TranslateT("%s client-to-client connections"), m_tszUserName);
nlu.ptszDescriptiveName = name;
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp
index ce0aaec509..85097b5146 100644
--- a/protocols/IRCG/src/options.cpp
+++ b/protocols/IRCG/src/options.cpp
@@ -399,7 +399,7 @@ struct CServerDlg : public CProtoDlgBase<CIrcProto>
pData->m_name = m_server.GetTextA();
char temp[255];
- mir_snprintf(temp, sizeof(temp), "%s: %s", pData->m_group, pData->m_name);
+ mir_snprintf(temp, SIZEOF(temp), "%s: %s", pData->m_group, pData->m_name);
mir_free(pData->m_name);
pData->m_name = mir_strdup(temp);
@@ -781,9 +781,9 @@ void CConnectPrefsDlg::OnApply()
char TextLine[512];
if (pData->m_iSSL > 0)
- mir_snprintf(TextLine, sizeof(TextLine), "SERVER:SSL%u%s:%d-%dGROUP:%s", pData->m_iSSL, pData->m_address, pData->m_portStart, pData->m_portEnd, pData->m_group);
+ mir_snprintf(TextLine, SIZEOF(TextLine), "SERVER:SSL%u%s:%d-%dGROUP:%s", pData->m_iSSL, pData->m_address, pData->m_portStart, pData->m_portEnd, pData->m_group);
else
- mir_snprintf(TextLine, sizeof(TextLine), "SERVER:%s:%d-%dGROUP:%s", pData->m_address, pData->m_portStart, pData->m_portEnd, pData->m_group);
+ mir_snprintf(TextLine, SIZEOF(TextLine), "SERVER:%s:%d-%dGROUP:%s", pData->m_address, pData->m_portStart, pData->m_portEnd, pData->m_group);
db_set_s(NULL, SERVERSMODULE, pData->m_name, TextLine);
// combobox might contain new items
@@ -1375,7 +1375,7 @@ void CIrcProto::InitIgnore(void)
int idx = 0;
char settingName[40];
for (;;) {
- mir_snprintf(settingName, sizeof(settingName), "IGNORE:%d", idx++);
+ mir_snprintf(settingName, SIZEOF(settingName), "IGNORE:%d", idx++);
DBVARIANT dbv;
if (getTString(settingName, &dbv))
@@ -1395,13 +1395,13 @@ void CIrcProto::RewriteIgnoreSettings(void)
int i = 0;
for (;;) {
- mir_snprintf(settingName, sizeof(settingName), "IGNORE:%d", i++);
+ mir_snprintf(settingName, SIZEOF(settingName), "IGNORE:%d", i++);
if (db_unset(NULL, m_szModuleName, settingName))
break;
}
for (i = 0; i < m_ignoreItems.getCount(); i++) {
- mir_snprintf(settingName, sizeof(settingName), "IGNORE:%d", i);
+ mir_snprintf(settingName, SIZEOF(settingName), "IGNORE:%d", i);
CIrcIgnoreItem& C = m_ignoreItems[i];
setTString(settingName, (C.mask + _T(" ") + C.flags + _T(" ") + C.network).c_str());