summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ
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/IcqOscarJ
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/IcqOscarJ')
-rw-r--r--protocols/IcqOscarJ/src/UI/userinfotab.cpp4
-rw-r--r--protocols/IcqOscarJ/src/changeinfo/editstring.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icq_menu.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icq_proto.cpp6
-rw-r--r--protocols/IcqOscarJ/src/icq_xstatus.cpp10
-rw-r--r--protocols/IcqOscarJ/src/log.cpp2
6 files changed, 13 insertions, 13 deletions
diff --git a/protocols/IcqOscarJ/src/UI/userinfotab.cpp b/protocols/IcqOscarJ/src/UI/userinfotab.cpp
index ee0c1da434..3dbdbdbd2f 100644
--- a/protocols/IcqOscarJ/src/UI/userinfotab.cpp
+++ b/protocols/IcqOscarJ/src/UI/userinfotab.cpp
@@ -115,11 +115,11 @@ static void SetValue(CIcqProto* ppro, HWND hwndDlg, int idCtrl, MCONTACT hContac
if (!mir_strlen(pXName)) { // give default name
pXName = ICQTranslateUtf(nameXStatus[bXStatus - 1]);
}
- mir_snprintf(str, sizeof(str), "%s (%s)", pszStatus, pXName);
+ mir_snprintf(str, SIZEOF(str), "%s (%s)", pszStatus, pXName);
SAFE_FREE((void**)&pXName);
}
else
- mir_snprintf(str, sizeof(str), pszStatus);
+ mir_snprintf(str, SIZEOF(str), "%s", pszStatus);
bUtf = 1;
SAFE_FREE(&pszStatus);
diff --git a/protocols/IcqOscarJ/src/changeinfo/editstring.cpp b/protocols/IcqOscarJ/src/changeinfo/editstring.cpp
index 528f73eaea..22ffcd6f23 100644
--- a/protocols/IcqOscarJ/src/changeinfo/editstring.cpp
+++ b/protocols/IcqOscarJ/src/changeinfo/editstring.cpp
@@ -239,7 +239,7 @@ void ChangeInfoData::BeginStringEdit(int iItem, RECT *rc, int i, WORD wVKey)
szValue = " ";
else if ((si.displayType & LIM_TYPE) == LI_NUMBER) {
szValue = str;
- mir_snprintf(str, sizeof(str), "%d", sid.value);
+ mir_snprintf(str, SIZEOF(str), "%d", sid.value);
}
else if (sid.value) {
szValue = BinaryToEscapes((char*)sid.value);
diff --git a/protocols/IcqOscarJ/src/icq_menu.cpp b/protocols/IcqOscarJ/src/icq_menu.cpp
index 0aebb2a2c7..916bbfb503 100644
--- a/protocols/IcqOscarJ/src/icq_menu.cpp
+++ b/protocols/IcqOscarJ/src/icq_menu.cpp
@@ -177,7 +177,7 @@ INT_PTR CIcqProto::OpenWebProfile(WPARAM hContact, LPARAM lParam)
{
DWORD dwUin = getContactUin(hContact);
char url[256];
- mir_snprintf(url, sizeof(url), "http://www.icq.com/people/%d",dwUin);
+ mir_snprintf(url, SIZEOF(url), "http://www.icq.com/people/%d",dwUin);
return CallService(MS_UTILS_OPENURL, 1, (LPARAM)url);
}
diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp
index 158f76ffc6..746987b17e 100644
--- a/protocols/IcqOscarJ/src/icq_proto.cpp
+++ b/protocols/IcqOscarJ/src/icq_proto.cpp
@@ -1968,11 +1968,11 @@ int __cdecl CIcqProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l
case EV_PROTO_ONERASE:
{
char szDbSetting[MAX_PATH];
- mir_snprintf(szDbSetting, sizeof(szDbSetting), "%sP2P", m_szModuleName);
+ mir_snprintf(szDbSetting, SIZEOF(szDbSetting), "%sP2P", m_szModuleName);
CallService(MS_DB_MODULE_DELETE, 0, (LPARAM)szDbSetting);
- mir_snprintf(szDbSetting, sizeof(szDbSetting), "%sSrvGroups", m_szModuleName);
+ mir_snprintf(szDbSetting, SIZEOF(szDbSetting), "%sSrvGroups", m_szModuleName);
CallService(MS_DB_MODULE_DELETE, 0, (LPARAM)szDbSetting);
- mir_snprintf(szDbSetting, sizeof(szDbSetting), "%sGroups", m_szModuleName);
+ mir_snprintf(szDbSetting, SIZEOF(szDbSetting), "%sGroups", m_szModuleName);
CallService(MS_DB_MODULE_DELETE, 0, (LPARAM)szDbSetting);
}
break;
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp
index fef0ede1c6..bb3c7d7a46 100644
--- a/protocols/IcqOscarJ/src/icq_xstatus.cpp
+++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp
@@ -702,7 +702,7 @@ static INT_PTR CALLBACK SetXStatusDlgProc(HWND hwndDlg,UINT message,WPARAM wPara
char buf[MAX_PATH];
char *format = GetWindowTextUtf(hwndDlg);
- mir_snprintf(str, sizeof(str), format, dat->bXStatus?ICQTranslateUtfStatic(nameXStatus[dat->bXStatus-1], buf, MAX_PATH):"");
+ mir_snprintf(str, SIZEOF(str), format, dat->bXStatus?ICQTranslateUtfStatic(nameXStatus[dat->bXStatus-1], buf, MAX_PATH):"");
SetWindowTextUtf(hwndDlg, str);
SAFE_FREE(&format);
}
@@ -714,7 +714,7 @@ static INT_PTR CALLBACK SetXStatusDlgProc(HWND hwndDlg,UINT message,WPARAM wPara
break;
}
- mir_snprintf(str,sizeof(str),dat->okButtonFormat,dat->countdown);
+ mir_snprintf(str,SIZEOF(str),dat->okButtonFormat,dat->countdown);
SetDlgItemTextUtf(hwndDlg,IDOK,str);
dat->countdown--;
break;
@@ -854,7 +854,7 @@ void CIcqProto::InitXStatusItems(BOOL bAllowStatus)
if (m_bHideXStatusUI || m_bHideXStatusMenu)
return;
- mir_snprintf(szItem, sizeof(szItem), Translate("%s Custom Status"), m_szModuleName);
+ mir_snprintf(szItem, SIZEOF(szItem), Translate("%s Custom Status"), m_szModuleName);
CLISTMENUITEM mi = { sizeof(mi) };
mi.pszPopupName = szItem;
@@ -862,7 +862,7 @@ void CIcqProto::InitXStatusItems(BOOL bAllowStatus)
mi.position = 2000040000;
for (int i = 0; i <= XSTATUS_COUNT; i++) {
- mir_snprintf(srvFce, sizeof(srvFce), "%s/menuXStatus%d", m_szModuleName, i);
+ mir_snprintf(srvFce, SIZEOF(srvFce), "%s/menuXStatus%d", m_szModuleName, i);
mi.position++;
@@ -894,7 +894,7 @@ void InitXStatusIcons()
for (int i = 0; i < XSTATUS_COUNT; i++) {
char szTemp[100];
- mir_snprintf(szTemp, sizeof(szTemp), "icq_xstatus%d", i);
+ mir_snprintf(szTemp, SIZEOF(szTemp), "icq_xstatus%d", i);
sid.pszName = szTemp;
sid.pszDescription = (LPSTR)nameXStatus[i];
sid.iDefaultIndex = -(IDI_XSTATUS1+i);
diff --git a/protocols/IcqOscarJ/src/log.cpp b/protocols/IcqOscarJ/src/log.cpp
index 52d53a85c4..9a51c88ea5 100644
--- a/protocols/IcqOscarJ/src/log.cpp
+++ b/protocols/IcqOscarJ/src/log.cpp
@@ -126,7 +126,7 @@ void CIcqProto::icq_LogUsingErrorCode(int level, DWORD dwError, const char *szMs
break;
}
- mir_snprintf(szBuf, sizeof(szBuf), "%s%s%s (%s %d)",
+ mir_snprintf(szBuf, SIZEOF(szBuf), "%s%s%s (%s %d)",
szMsg ? ICQTranslateUtfStatic(szMsg, str, 1024) : "",
szMsg ? "\r\n\r\n" : "",
ICQTranslateUtfStatic(pszErrorMsg, szErrorMsg, 512),