summaryrefslogtreecommitdiff
path: root/protocols/MSN
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-08-28 16:22:41 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-08-28 16:22:41 +0000
commitc370af60855db957c5b200914bf0bde743845528 (patch)
tree0bd2ef127097c9e937c2650e8b202c3f09453323 /protocols/MSN
parent7f082bd5d4865c30b313661b7a02f048b4b137be (diff)
mir_sntprintf / mir_snprintf: obsoleted second parameter removed wherever possible
git-svn-id: http://svn.miranda-ng.org/main/trunk@15064 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN')
-rw-r--r--protocols/MSN/src/msn_auth.cpp2
-rw-r--r--protocols/MSN/src/msn_commands.cpp20
-rw-r--r--protocols/MSN/src/msn_ftold.cpp6
-rw-r--r--protocols/MSN/src/msn_lists.cpp2
-rw-r--r--protocols/MSN/src/msn_mail.cpp11
-rw-r--r--protocols/MSN/src/msn_menu.cpp4
-rw-r--r--protocols/MSN/src/msn_misc.cpp18
-rw-r--r--protocols/MSN/src/msn_opts.cpp6
-rw-r--r--protocols/MSN/src/msn_p2p.cpp13
-rw-r--r--protocols/MSN/src/msn_proto.cpp6
-rw-r--r--protocols/MSN/src/msn_soapab.cpp14
-rw-r--r--protocols/MSN/src/msn_soapstore.cpp4
12 files changed, 52 insertions, 54 deletions
diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp
index b8f403a100..aead5f7480 100644
--- a/protocols/MSN/src/msn_auth.cpp
+++ b/protocols/MSN/src/msn_auth.cpp
@@ -278,7 +278,7 @@ int CMsnProto::MSN_GetPassportAuth(void)
}
else if (retVal != 3 && retVal != 7) {
char err[512];
- mir_snprintf(err, _countof(err), "Unknown Authentication error: %s", szFault);
+ mir_snprintf(err, "Unknown Authentication error: %s", szFault);
MSN_ShowError(err);
}
}
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp
index 6bb8167167..fbecb676ac 100644
--- a/protocols/MSN/src/msn_commands.cpp
+++ b/protocols/MSN/src/msn_commands.cpp
@@ -480,7 +480,7 @@ void CMsnProto::MSN_ProcessURIObject(MCONTACT hContact, ezxml_t xmli)
sprintf(ft->szInvcookie, "%s/content/imgpsh", uri);
TCHAR tComment[40];
- mir_sntprintf(tComment, _countof(tComment), TranslateT("%I64u bytes"), ft->std.currentFileSize);
+ mir_sntprintf(tComment, TranslateT("%I64u bytes"), ft->std.currentFileSize);
PROTORECVFILET pre = { 0 };
pre.dwFlags = PRFF_TCHAR;
@@ -521,7 +521,7 @@ void CMsnProto::MSN_ProcessYFind(char* buf, size_t len)
const char* szCont = ezxml_attr(cont, "n");
char szEmail[128];
- mir_snprintf(szEmail, _countof(szEmail), "%s@%s", szCont, szDom);
+ mir_snprintf(szEmail, "%s@%s", szCont, szDom);
const char *szNetId = ezxml_attr(cont, "t");
if (msnSearchId != NULL) {
@@ -761,7 +761,7 @@ void CMsnProto::MSN_ProcessStatusMessage(ezxml_t xmli, const char* wlid)
for (unsigned i = 4; i < pCount; i++) {
char part[16];
- size_t lenPart = mir_snprintf(part, _countof(part), "{%d}", i - 4);
+ size_t lenPart = mir_snprintf(part, "{%d}", i - 4);
if (parts[i][0] == '\0' && unknown != NULL)
parts[i] = unknown;
size_t lenPartsI = mir_strlen(parts[i]);
@@ -1431,7 +1431,7 @@ void CMsnProto::MSN_InviteMessage(ThreadData* info, char* msgBody, char* email,
ft->p2p_dest = mir_strdup(email);
TCHAR tComment[40];
- mir_sntprintf(tComment, _countof(tComment), TranslateT("%I64u bytes"), ft->std.currentFileSize);
+ mir_sntprintf(tComment, TranslateT("%I64u bytes"), ft->std.currentFileSize);
PROTORECVFILET pre = { 0 };
pre.dwFlags = PRFF_TCHAR;
@@ -1449,9 +1449,9 @@ void CMsnProto::MSN_InviteMessage(ThreadData* info, char* msgBody, char* email,
ThreadData* newThread = new ThreadData;
if (inet_addr(IPAddress) != MyConnection.extIP || !IPAddressInt)
- mir_snprintf(newThread->mServer, _countof(newThread->mServer), "%s:%s", IPAddress, Port);
+ mir_snprintf(newThread->mServer, "%s:%s", IPAddress, Port);
else
- mir_snprintf(newThread->mServer, _countof(newThread->mServer), "%s:%u", IPAddressInt, atol(PortXInt) ^ 0x3141);
+ mir_snprintf(newThread->mServer, "%s:%u", IPAddressInt, atol(PortXInt) ^ 0x3141);
newThread->mType = SERVER_FILETRANS;
@@ -1528,7 +1528,7 @@ void CMsnProto::MSN_InviteMessage(ThreadData* info, char* msgBody, char* email,
if (IPAddress != NULL && Port == NULL && SessionID != NULL && SessionProtocol == NULL) { // netmeeting receive 2
char ipaddr[256];
- mir_snprintf(ipaddr, _countof(ipaddr), "callto://%s", IPAddress);
+ mir_snprintf(ipaddr, "callto://%s", IPAddress);
ShellExecuteA(NULL, "open", ipaddr, NULL, NULL, SW_SHOW);
}
}
@@ -1545,7 +1545,7 @@ void CMsnProto::MSN_ProcessRemove(char* buf, size_t len)
int listId = atol(ezxml_attr(cont, "l"));
char szEmail[128];
- mir_snprintf(szEmail, _countof(szEmail), "%s@%s", szCont, szDom);
+ mir_snprintf(szEmail, "%s@%s", szCont, szDom);
Lists_Remove(listId, szEmail);
MsnContact* msc = Lists_Get(szEmail);
@@ -1641,7 +1641,7 @@ void CMsnProto::MSN_ProcessAdd(char* buf, size_t len)
int netId = atol(ezxml_attr(cont, "t"));
char szEmail[128];
- mir_snprintf(szEmail, _countof(szEmail), "%s@%s", szCont, szDom);
+ mir_snprintf(szEmail, "%s@%s", szCont, szDom);
UrlDecode((char*)szNick);
@@ -2203,7 +2203,7 @@ LBL_InvalidCommand:
newThread->mType = SERVER_SWITCHBOARD;
newThread->mInitialContactWLID = mir_strdup(data.callerEmail);
MSN_HContactFromEmail(data.callerEmail, data.callerNick, true, true);
- mir_snprintf(newThread->mCookie, _countof(newThread->mCookie), "%s %d", data.authChallengeInfo, trid);
+ mir_snprintf(newThread->mCookie, "%s %d", data.authChallengeInfo, trid);
ReleaseSemaphore(newThread->hWaitEvent, MSN_PACKETS_COMBINE, NULL);
diff --git a/protocols/MSN/src/msn_ftold.cpp b/protocols/MSN/src/msn_ftold.cpp
index 94e257fade..bdb3ebd46f 100644
--- a/protocols/MSN/src/msn_ftold.cpp
+++ b/protocols/MSN/src/msn_ftold.cpp
@@ -64,7 +64,7 @@ void CMsnProto::msnftp_invite(filetransfer *ft)
pszFiles = *ft->std.ptszFiles;
char msg[1024];
- mir_snprintf(msg, _countof(msg),
+ mir_snprintf(msg,
"Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n\r\n"
"Application-Name: File Transfer\r\n"
"Application-GUID: {5D3E02AB-6190-11d3-BBBB-00C04F795683}\r\n"
@@ -152,7 +152,7 @@ int CMsnProto::MSN_HandleMSNFTP(ThreadData *info, char *cmdString)
char tCommand[30];
size_t tCommandLen;
- tCommandLen = mir_snprintf(tCommand, _countof(tCommand), "FIL %i\r\n", info->mMsnFtp->std.totalBytes);
+ tCommandLen = mir_snprintf(tCommand, "FIL %i\r\n", info->mMsnFtp->std.totalBytes);
info->send(tCommand, tCommandLen);
break;
@@ -176,7 +176,7 @@ LBL_InvalidCommand:
if (info->mCaller == 0) { //receive
char tCommand[MSN_MAX_EMAIL_LEN + 50];
size_t tCommandLen;
- tCommandLen = mir_snprintf(tCommand, _countof(tCommand), "USR %s %s\r\n", MyOptions.szEmail, info->mCookie);
+ tCommandLen = mir_snprintf(tCommand, "USR %s %s\r\n", MyOptions.szEmail, info->mCookie);
info->send(tCommand, tCommandLen);
}
else if (info->mCaller == 2) { //send
diff --git a/protocols/MSN/src/msn_lists.cpp b/protocols/MSN/src/msn_lists.cpp
index 2afcc94d86..8e747106ca 100644
--- a/protocols/MSN/src/msn_lists.cpp
+++ b/protocols/MSN/src/msn_lists.cpp
@@ -243,7 +243,7 @@ void CMsnProto::MSN_CleanupLists(void)
mir_free(sze);
TCHAR title[128];
- mir_sntprintf(title, _countof(title), TranslateT("%s protocol"), m_tszUserName);
+ mir_sntprintf(title, TranslateT("%s protocol"), m_tszUserName);
if (MessageBox(NULL, text, title, MB_YESNO | MB_ICONQUESTION | MB_SETFOREGROUND) == IDYES) {
MSN_AddUser(p.hContact, p.email, 0, LIST_LL);
diff --git a/protocols/MSN/src/msn_mail.cpp b/protocols/MSN/src/msn_mail.cpp
index 312cc2bfd7..375c28873c 100644
--- a/protocols/MSN/src/msn_mail.cpp
+++ b/protocols/MSN/src/msn_mail.cpp
@@ -255,14 +255,14 @@ void CMsnProto::sttNotificationMessage(char* msgBody, bool isInitial)
wchar_t* mimeSubjectW = tFileInfo.decode(Subject);
- mir_sntprintf(tBuffer2, _countof(tBuffer2), TranslateT("Subject: %s"), mimeSubjectW);
+ mir_sntprintf(tBuffer2, TranslateT("Subject: %s"), mimeSubjectW);
TCHAR* msgtxt = _stricmp(From, Fromaddr) ?
TranslateT("Hotmail from %s (%S)") : TranslateT("Hotmail from %s");
- mir_sntprintf(tBuffer, _countof(tBuffer), msgtxt, mimeFromW, Fromaddr);
+ mir_sntprintf(tBuffer, msgtxt, mimeFromW, Fromaddr);
mir_free(mimeFromW);
mir_free(mimeSubjectW);
ShowPopup = true;
@@ -271,8 +271,8 @@ void CMsnProto::sttNotificationMessage(char* msgBody, bool isInitial)
const char* MailData = tFileInfo["Mail-Data"];
if (MailData != NULL) processMailData((char*)MailData);
- mir_sntprintf(tBuffer, _countof(tBuffer), m_tszUserName);
- mir_sntprintf(tBuffer2, _countof(tBuffer2), TranslateT("Unread mail is available: %d in Inbox and %d in other folders."), mUnreadMessages, mUnreadJunkEmails);
+ mir_sntprintf(tBuffer, m_tszUserName);
+ mir_sntprintf(tBuffer2, TranslateT("Unread mail is available: %d in Inbox and %d in other folders."), mUnreadMessages, mUnreadJunkEmails);
}
if (UnreadMessages == mUnreadMessages && UnreadJunkEmails == mUnreadJunkEmails && !isInitial)
@@ -390,8 +390,7 @@ void CMsnProto::displayEmailCount(MCONTACT hContact)
rtrimt(name);
TCHAR szNick[128];
- mir_sntprintf(szNick, _countof(szNick),
- getByte("DisableHotmailJunk", 0) ? _T("%s [%d]") : _T("%s [%d][%d]"), name, mUnreadMessages, mUnreadJunkEmails);
+ mir_sntprintf(szNick, getByte("DisableHotmailJunk", 0) ? _T("%s [%d]") : _T("%s [%d][%d]"), name, mUnreadMessages, mUnreadJunkEmails);
nickChg = true;
db_set_ts(hContact, "CList", "MyHandle", szNick);
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp
index e199fab8da..5d04fa9bc4 100644
--- a/protocols/MSN/src/msn_menu.cpp
+++ b/protocols/MSN/src/msn_menu.cpp
@@ -93,7 +93,7 @@ INT_PTR CMsnProto::MsnViewProfile(WPARAM hContact, LPARAM)
}
char tUrl[256];
- mir_snprintf(tUrl, _countof(tUrl), "http://cid-%I64X.profiles.live.com", _atoi64(cid));
+ mir_snprintf(tUrl, "http://cid-%I64X.profiles.live.com", _atoi64(cid));
MsnInvokeMyURL(false, tUrl);
return 0;
}
@@ -177,7 +177,7 @@ INT_PTR CMsnProto::MsnSendNetMeeting(WPARAM wParam, LPARAM)
char msg[1024];
- mir_snprintf(msg, _countof(msg),
+ mir_snprintf(msg,
"Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n\r\n"
"Application-Name: NetMeeting\r\n"
"Application-GUID: {44BBA842-CC51-11CF-AAFA-00AA00B6015C}\r\n"
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp
index 9f7f6ab15f..7efabf73f9 100644
--- a/protocols/MSN/src/msn_misc.cpp
+++ b/protocols/MSN/src/msn_misc.cpp
@@ -122,7 +122,7 @@ void CMsnProto::InitCustomFolders(void)
if (InitCstFldRan) return;
TCHAR folder[MAX_PATH];
- mir_sntprintf(folder, _countof(folder), _T("%%miranda_avatarcache%%\\%S"), m_szModuleName);
+ mir_sntprintf(folder, _T("%%miranda_avatarcache%%\\%S"), m_szModuleName);
hCustomSmileyFolder = FoldersRegisterCustomPathT(LPGEN("Custom Smileys"), m_szModuleName, folder, m_tszUserName);
InitCstFldRan = true;
@@ -541,7 +541,7 @@ void ThreadData::sendCaps(void)
char mversion[100], capMsg[1000];
CallService(MS_SYSTEM_GETVERSIONTEXT, sizeof(mversion), (LPARAM)mversion);
- mir_snprintf(capMsg, _countof(capMsg),
+ mir_snprintf(capMsg,
"Content-Type: text/x-clientcaps\r\n\r\n"
"Client-Name: Miranda NG %s (MSN v.%s)\r\n",
mversion, __VERSION_STRING_DOTS);
@@ -586,7 +586,7 @@ int ThreadData::sendRawMessage(int msgType, const char* data, int datLen)
void CMsnProto::MSN_SendTyping(ThreadData* info, const char* email, int netId, bool bTyping)
{
char tCommand[1024];
- mir_snprintf(tCommand, _countof(tCommand),
+ mir_snprintf(tCommand,
"Messaging: 2.0\r\n"
"Message-Type: %s\r\n"
"Content-Type: Application/Message\r\n"
@@ -632,7 +632,7 @@ void CMsnProto::MSN_SendStatusMessage(const char*)
size_t sz;
char szMsg[2048];
if (msnCurrentMedia.cbSize == 0) {
- sz = mir_snprintf(szMsg, _countof(szMsg), "<Data><PSM>%s</PSM><CurrentMedia></CurrentMedia><MachineGuid>%s</MachineGuid>"
+ sz = mir_snprintf(szMsg, "<Data><PSM>%s</PSM><CurrentMedia></CurrentMedia><MachineGuid>%s</MachineGuid>"
"<DDP></DDP><SignatureSound></SignatureSound><Scene></Scene><ColorScheme></ColorScheme></Data>",
msgEnc, MyOptions.szMachineGuid);
}
@@ -799,7 +799,7 @@ void CMsnProto::MSN_SetServerStatus(int newStatus)
char szMsg[2048];
#ifdef OBSOLETE
if (m_iStatus < ID_STATUS_ONLINE) {
- int sz = mir_snprintf(szMsg, _countof(szMsg),
+ int sz = mir_snprintf(szMsg,
"<EndpointData><Capabilities>%u:%u</Capabilities></EndpointData>", myFlags, myFlagsEx);
msnNsThread->sendPacket("UUX", "%d\r\n%s", sz, szMsg);
@@ -826,7 +826,7 @@ void CMsnProto::MSN_SetServerStatus(int newStatus)
}
char** msgptr = GetStatusMsgLoc(newStatus);
- int sz = mir_snprintf(szMsg, _countof(szMsg),
+ int sz = mir_snprintf(szMsg,
"<user>"
"<sep n=\"PE\" epid=\"%s\"><VER>%s</VER><TYP>11</TYP><Capabilities>0:0</Capabilities></sep>"
"<s n=\"IM\"><Status>%s</Status></s>"
@@ -859,7 +859,7 @@ void CMsnProto::MSN_SetServerStatus(int newStatus)
// TODO: Send, MSN_SendStatusMessage anpassen.
#ifdef OBSOLETE
- int sz = mir_snprintf(szMsg, _countof(szMsg),
+ int sz = mir_snprintf(szMsg,
"<PrivateEndpointData>"
"<EpName>%s</EpName>"
"<Idle>%s</Idle>"
@@ -1068,7 +1068,7 @@ void CALLBACK sttMainThreadCallback(PVOID dwParam)
if ((iserr && !pud->proto->MyOptions.ShowErrorsAsPopups) || !ServiceExists(MS_POPUP_ADDPOPUPCLASS)) {
if (pud->flags & MSN_ALLOW_MSGBOX) {
TCHAR szMsg[MAX_SECONDLINE + MAX_CONTACTNAME];
- mir_sntprintf(szMsg, _countof(szMsg), _T("%s:\n%s"), pud->title, pud->text);
+ mir_sntprintf(szMsg, _T("%s:\n%s"), pud->title, pud->text);
int ret = MessageBox(NULL, szMsg, TranslateT("MSN Protocol"),
MB_YESNO | (iserr ? MB_ICONERROR : MB_ICONINFORMATION));
if (ret == IDYES)
@@ -1404,7 +1404,7 @@ void MSN_MakeDigest(const char* chl, char* dgst)
md5hash[i] &= 0x7FFFFFFF;
char chlString[128];
- mir_snprintf(chlString, _countof(chlString), "%s%s00000000", chl, msnProductID);
+ mir_snprintf(chlString, "%s%s00000000", chl, msnProductID);
chlString[(mir_strlen(chl) + mir_strlen(msnProductID) + 7) & 0xF8] = 0;
LONGLONG high = 0, low = 0;
diff --git a/protocols/MSN/src/msn_opts.cpp b/protocols/MSN/src/msn_opts.cpp
index 6b267e22cf..648b4af59f 100644
--- a/protocols/MSN/src/msn_opts.cpp
+++ b/protocols/MSN/src/msn_opts.cpp
@@ -53,7 +53,7 @@ void MsnInitIcons(void)
HICON LoadIconEx(const char* name, bool big)
{
char szSettingName[100];
- mir_snprintf(szSettingName, _countof(szSettingName), "MSN_%s", name);
+ mir_snprintf(szSettingName, "MSN_%s", name);
return IcoLib_GetIcon(szSettingName, big);
}
@@ -69,7 +69,7 @@ HANDLE GetIconHandle(int iconId)
void ReleaseIconEx(const char* name, bool big)
{
char szSettingName[100];
- mir_snprintf(szSettingName, _countof(szSettingName), "MSN_%s", name);
+ mir_snprintf(szSettingName, "MSN_%s", name);
IcoLib_Release(szSettingName, big);
}
@@ -204,7 +204,7 @@ LBL_Continue:
if (strchr(szFile, ' ') != NULL) {
char tmpBuf[MAX_PATH + 2];
- mir_snprintf(tmpBuf, _countof(tmpBuf), "\"%s\"", szFile);
+ mir_snprintf(tmpBuf, "\"%s\"", szFile);
mir_strcpy(szFile, tmpBuf);
}
diff --git a/protocols/MSN/src/msn_p2p.cpp b/protocols/MSN/src/msn_p2p.cpp
index dc965db7dd..c1676a91de 100644
--- a/protocols/MSN/src/msn_p2p.cpp
+++ b/protocols/MSN/src/msn_p2p.cpp
@@ -1224,7 +1224,7 @@ void CMsnProto::p2p_InitFileTransfer(
ft->std.totalFiles = 1;
TCHAR tComment[40];
- mir_sntprintf(tComment, _countof(tComment), TranslateT("%I64u bytes"), ft->std.currentFileSize);
+ mir_sntprintf(tComment, TranslateT("%I64u bytes"), ft->std.currentFileSize);
PROTORECVFILET pre = { 0 };
pre.dwFlags = PRFF_TCHAR;
@@ -1396,8 +1396,7 @@ void CMsnProto::p2p_startConnect(const char* wlid, const char* szCallID, const c
newThread->mType = SERVER_P2P_DIRECT;
newThread->mInitialContactWLID = mir_strdup(wlid);
strncpy_s(newThread->mCookie, szCallID, _TRUNCATE);
- mir_snprintf(newThread->mServer, _countof(newThread->mServer),
- ipv6 ? "[%s]:%s" : "%s:%s", pAddrTokBeg, pPortTokBeg);
+ mir_snprintf(newThread->mServer, ipv6 ? "[%s]:%s" : "%s:%s", pAddrTokBeg, pPortTokBeg);
newThread->startThread(&CMsnProto::p2p_fileActiveThread, this);
@@ -1739,7 +1738,7 @@ void CMsnProto::p2p_processMsgV2(ThreadData* info, char* msgbody, const char* wl
if (hdrdata.mRemSize || hdrdata.mTFCode == 0) {
char msgid[128];
- mir_snprintf(msgid, _countof(msgid), "%s_%08x", wlid, hdrdata.mPacketNum);
+ mir_snprintf(msgid, "%s_%08x", wlid, hdrdata.mPacketNum);
int idx;
if (hdrdata.mTFCode == 0x01) {
@@ -1830,7 +1829,7 @@ void CMsnProto::p2p_processMsg(ThreadData* info, char* msgbody, const char* wlid
if (hdrdata.mPacketLen < hdrdata.mTotalSize) {
char msgid[128];
- mir_snprintf(msgid, _countof(msgid), "%s_%08x", wlid, hdrdata.mID);
+ mir_snprintf(msgid, "%s_%08x", wlid, hdrdata.mID);
int idx = addCachedMsg(msgid, msgbody, (size_t)hdrdata.mOffset, hdrdata.mPacketLen,
(size_t)hdrdata.mTotalSize, false);
@@ -2094,7 +2093,7 @@ void CMsnProto::p2p_invite(unsigned iAppID, filetransfer* ft, const char *wlid)
if (ft->p2p_isV2) {
if (cont->places.getCount() && cont->places[0].cap1 & cap_SupportsP2PBootstrap) {
char wlid[128];
- mir_snprintf(wlid, _countof(wlid),
+ mir_snprintf(wlid,
mir_strcmp(cont->places[0].id, sttVoidUid) ? "%s;%s" : "%s",
cont->email, cont->places[0].id);
@@ -2145,7 +2144,7 @@ void CMsnProto::p2p_invite(unsigned iAppID, filetransfer* ft, const char *wlid)
if (ft->p2p_isV2 && ft->std.currentFileNumber == 0) {
for (int i = 0; i < cont->places.getCount(); ++i) {
char wlid[128];
- mir_snprintf(wlid, _countof(wlid),
+ mir_snprintf(wlid,
mir_strcmp(cont->places[i].id, sttVoidUid) ? "%s;%s" : "%s",
cont->email, cont->places[i].id);
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp
index 5c9955d37b..69bd39aa5d 100644
--- a/protocols/MSN/src/msn_proto.cpp
+++ b/protocols/MSN/src/msn_proto.cpp
@@ -128,7 +128,7 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) :
nlu1.szSettingsModule = szDbsettings;
nlu1.ptszDescriptiveName = szBuffer;
- mir_snprintf(szDbsettings, _countof(szDbsettings), "%s_HTTPS", m_szModuleName);
+ mir_snprintf(szDbsettings, "%s_HTTPS", m_szModuleName);
mir_sntprintf(szBuffer, TranslateT("%s plugin HTTPS connections"), m_tszUserName);
hNetlibUserHttps = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu1);
@@ -492,7 +492,7 @@ void __cdecl CMsnProto::MsnFileAckThread(void* arg)
filetransfer* ft = (filetransfer*)arg;
TCHAR filefull[MAX_PATH];
- mir_sntprintf(filefull, _countof(filefull), _T("%s\\%s"), ft->std.tszWorkingDir, ft->std.tszCurrentFile);
+ mir_sntprintf(filefull, _T("%s\\%s"), ft->std.tszWorkingDir, ft->std.tszCurrentFile);
replaceStrT(ft->std.tszCurrentFile, filefull);
ResetEvent(ft->hResumeEvt);
@@ -1224,7 +1224,7 @@ int __cdecl CMsnProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l
case EV_PROTO_ONERASE:
char szDbsettings[64];
- mir_snprintf(szDbsettings, _countof(szDbsettings), "%s_HTTPS", m_szModuleName);
+ mir_snprintf(szDbsettings, "%s_HTTPS", m_szModuleName);
CallService(MS_DB_MODULE_DELETE, 0, (LPARAM)szDbsettings);
break;
diff --git a/protocols/MSN/src/msn_soapab.cpp b/protocols/MSN/src/msn_soapab.cpp
index c9404004f9..a6cc884788 100644
--- a/protocols/MSN/src/msn_soapab.cpp
+++ b/protocols/MSN/src/msn_soapab.cpp
@@ -74,8 +74,8 @@ ezxml_t CMsnProto::abSoapHdr(const char* service, const char* scenario, ezxml_t&
ezxml_t CMsnProto::getSoapResponse(ezxml_t bdy, const char* service)
{
char resp1[40], resp2[40];
- mir_snprintf(resp1, _countof(resp1), "%sResponse", service);
- mir_snprintf(resp2, _countof(resp2), "%sResult", service);
+ mir_snprintf(resp1, "%sResponse", service);
+ mir_snprintf(resp2, "%sResult", service);
ezxml_t res = ezxml_get(bdy, "soap:Body", 0, resp1, 0, resp2, -1);
if (res == NULL)
@@ -93,7 +93,7 @@ ezxml_t CMsnProto::getSoapFault(ezxml_t bdy, bool err)
void CMsnProto::UpdateABHost(const char* service, const char* url)
{
char hostname[128];
- mir_snprintf(hostname, _countof(hostname), "ABHost-%s", service);
+ mir_snprintf(hostname, "ABHost-%s", service);
if (url)
setString(hostname, url);
@@ -112,7 +112,7 @@ void CMsnProto::UpdateABCacheKey(ezxml_t bdy, bool isSharing)
char* CMsnProto::GetABHost(const char* service, bool isSharing)
{
char hostname[128];
- mir_snprintf(hostname, _countof(hostname), "ABHost-%s", service);
+ mir_snprintf(hostname, "ABHost-%s", service);
char* host = (char*)mir_alloc(256);
if (db_get_static(NULL, m_szModuleName, hostname, host, 256)) {
@@ -265,7 +265,7 @@ bool CMsnProto::MSN_SharingFindMembership(bool deltas, bool allowRecurse)
}
else if (mir_strcmp(szType, "Phone") == 0) {
netId = NETID_MOB;
- mir_snprintf(email, _countof(email), "tel:%s", ezxml_txt(ezxml_child(memb, "PhoneNumber")));
+ mir_snprintf(email, "tel:%s", ezxml_txt(ezxml_child(memb, "PhoneNumber")));
szEmail = email;
}
else if (mir_strcmp(szType, "Email") == 0) {
@@ -656,7 +656,7 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas
szMsgUsr = ezxml_txt(ezxml_child(phn, "isMessengerEnabled"));
if (mir_strcmp(szMsgUsr, "true") == 0) {
szEmail = ezxml_txt(ezxml_child(phn, "number"));
- mir_snprintf(email, _countof(email), "tel:%s", szEmail);
+ mir_snprintf(email, "tel:%s", szEmail);
szEmail = email;
netId = NETID_MOB;
break;
@@ -1551,7 +1551,7 @@ void CMsnProto::MSN_ABUpdateDynamicItem(bool allowRecurse)
tm *tmst = gmtime(&timer);
char tmstr[64];
- mir_snprintf(tmstr, _countof(tmstr), "%04u-%02u-%02uT%02u:%02u:%02uZ",
+ mir_snprintf(tmstr, "%04u-%02u-%02uT%02u:%02u:%02uZ",
tmst->tm_year + 1900, tmst->tm_mon + 1, tmst->tm_mday,
tmst->tm_hour, tmst->tm_min, tmst->tm_sec);
diff --git a/protocols/MSN/src/msn_soapstore.cpp b/protocols/MSN/src/msn_soapstore.cpp
index fc8a5b96f2..8a86cd0635 100644
--- a/protocols/MSN/src/msn_soapstore.cpp
+++ b/protocols/MSN/src/msn_soapstore.cpp
@@ -71,7 +71,7 @@ ezxml_t CMsnProto::storeSoapHdr(const char* service, const char* scenario, ezxml
char* CMsnProto::GetStoreHost(const char* service)
{
char hostname[128];
- mir_snprintf(hostname, _countof(hostname), "StoreHost-%s", service);
+ mir_snprintf(hostname, "StoreHost-%s", service);
char* host = (char*)mir_alloc(256);
if (db_get_static(NULL, m_szModuleName, hostname, host, 256) || !*host)
@@ -83,7 +83,7 @@ char* CMsnProto::GetStoreHost(const char* service)
void CMsnProto::UpdateStoreHost(const char* service, const char* url)
{
char hostname[128];
- mir_snprintf(hostname, _countof(hostname), "StoreHost-%s", service);
+ mir_snprintf(hostname, "StoreHost-%s", service);
setString(hostname, url);
}