diff options
Diffstat (limited to 'protocols/Tlen/src/tlen_thread.cpp')
-rw-r--r-- | protocols/Tlen/src/tlen_thread.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/Tlen/src/tlen_thread.cpp b/protocols/Tlen/src/tlen_thread.cpp index f6c86885b8..4c3c43769f 100644 --- a/protocols/Tlen/src/tlen_thread.cpp +++ b/protocols/Tlen/src/tlen_thread.cpp @@ -72,13 +72,13 @@ static INT_PTR CALLBACK TlenPasswordDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- mir_snprintf(text, SIZEOF(text), Translate("Enter password for %s"), (char *) lParam);
+ mir_snprintf(text, _countof(text), Translate("Enter password for %s"), (char *) lParam);
SetDlgItemTextA(hwndDlg, IDC_JID, text);
return TRUE;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDOK:
- GetDlgItemTextA(hwndDlg, IDC_PASSWORD, onlinePassword, SIZEOF(onlinePassword));
+ GetDlgItemTextA(hwndDlg, IDC_PASSWORD, onlinePassword, _countof(onlinePassword));
//EndDialog(hwndDlg, (int) onlinePassword);
//return TRUE;
// Fall through
@@ -207,7 +207,7 @@ void __cdecl TlenServerThread(ThreadData *info) return;
}
- mir_snprintf(jidStr, SIZEOF(jidStr), "%s@%s", info->username, info->server);
+ mir_snprintf(jidStr, _countof(jidStr), "%s@%s", info->username, info->server);
db_set_s(NULL, info->proto->m_szModuleName, "jid", jidStr);
if (!db_get(NULL, info->proto->m_szModuleName, "ManualHost", &dbv)) {
@@ -402,7 +402,7 @@ static void TlenSendAuth(TlenProtocol *proto) { int iqId;
char text[128];
char *str = TlenPasswordHash(proto->threadData->password);
- mir_snprintf(text, SIZEOF(text), "%s%s", proto->threadData->streamId, str);
+ mir_snprintf(text, _countof(text), "%s%s", proto->threadData->streamId, str);
mir_free(str);
str = TlenSha1(text);
char *p=TlenTextEncode(proto->threadData->username);
@@ -912,7 +912,7 @@ static void TlenProcessW(XmlNode *node, ThreadData *info) char *f = TlenXmlGetAttrValue(node, "f");
if (f != NULL) {
char webContactName[128];
- mir_snprintf(webContactName, SIZEOF(webContactName), Translate("%s Web Messages"), info->proto->m_szModuleName);
+ mir_snprintf(webContactName, _countof(webContactName), Translate("%s Web Messages"), info->proto->m_szModuleName);
MCONTACT hContact = TlenHContactFromJID(info->proto, webContactName);
if (hContact == NULL) {
hContact = TlenDBCreateContact(info->proto, webContactName, webContactName, TRUE);
@@ -1198,7 +1198,7 @@ static void TlenProcessV(XmlNode *node, ThreadData *info) char *from=TlenXmlGetAttrValue(node, "f");
if (from != NULL) {
if (strchr(from, '@') == NULL) {
- mir_snprintf(jid, SIZEOF(jid), "%s@%s", from, info->server);
+ mir_snprintf(jid, _countof(jid), "%s@%s", from, info->server);
} else {
strncpy_s(jid, from, _TRUNCATE);
}
|