summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_soapab.cpp
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/MSN/src/msn_soapab.cpp
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/MSN/src/msn_soapab.cpp')
-rw-r--r--protocols/MSN/src/msn_soapab.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/protocols/MSN/src/msn_soapab.cpp b/protocols/MSN/src/msn_soapab.cpp
index a3871d4c37..22b92fe25b 100644
--- a/protocols/MSN/src/msn_soapab.cpp
+++ b/protocols/MSN/src/msn_soapab.cpp
@@ -76,8 +76,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, sizeof(resp1), "%sResponse", service);
- mir_snprintf(resp2, sizeof(resp2), "%sResult", service);
+ mir_snprintf(resp1, SIZEOF(resp1), "%sResponse", service);
+ mir_snprintf(resp2, SIZEOF(resp2), "%sResult", service);
ezxml_t res = ezxml_get(bdy, "soap:Body", 0, resp1, 0, resp2, -1);
if (res == NULL)
@@ -95,7 +95,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, sizeof(hostname), "ABHost-%s", service);
+ mir_snprintf(hostname, SIZEOF(hostname), "ABHost-%s", service);
if (url)
setString(hostname, url);
@@ -114,7 +114,7 @@ void CMsnProto::UpdateABCacheKey(ezxml_t bdy, bool isSharing)
char* CMsnProto::GetABHost(const char* service, bool isSharing)
{
char hostname[128];
- mir_snprintf(hostname, sizeof(hostname), "ABHost-%s", service);
+ mir_snprintf(hostname, SIZEOF(hostname), "ABHost-%s", service);
char* host = (char*)mir_alloc(256);
if (db_get_static(NULL, m_szModuleName, hostname, host, 256)) {
@@ -286,7 +286,7 @@ bool CMsnProto::MSN_SharingFindMembership(bool deltas, bool allowRecurse)
else if (strcmp(szType, "Phone") == 0) {
netId = NETID_MOB;
char email[128];
- mir_snprintf(email, sizeof(email), "tel:%s", ezxml_txt(ezxml_child(memb, "PhoneNumber")));
+ mir_snprintf(email, SIZEOF(email), "tel:%s", ezxml_txt(ezxml_child(memb, "PhoneNumber")));
szEmail = email;
}
else if (strcmp(szType, "Email") == 0) {
@@ -403,7 +403,7 @@ bool CMsnProto::MSN_SharingAddDelMember(const char* szEmail, const int listId, c
ezxml_set_txt(node, "MSN.IM.BuddyType");
node = ezxml_add_child(anot, "Value", 0);
- mir_snprintf(buf, sizeof(buf), "%02d:", netId);
+ mir_snprintf(buf, SIZEOF(buf), "%02d:", netId);
ezxml_set_txt(node, buf);
}
@@ -637,8 +637,8 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas
}
ezxml_t abinf = ezxml_child(ab, "abInfo");
- mir_snprintf(mycid, sizeof(mycid), "%s", ezxml_txt(ezxml_child(abinf, "OwnerCID")));
- mir_snprintf(mypuid, sizeof(mycid), "%s", ezxml_txt(ezxml_child(abinf, "ownerPuid")));
+ mir_snprintf(mycid, SIZEOF(mycid), "%s", ezxml_txt(ezxml_child(abinf, "OwnerCID")));
+ mir_snprintf(mypuid, SIZEOF(mypuid), "%s", ezxml_txt(ezxml_child(abinf, "ownerPuid")));
if (MyOptions.ManageServer) {
ezxml_t grp = ezxml_get(body, szGroups, 0, "Group", -1);
@@ -688,7 +688,7 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas
szMsgUsr = ezxml_txt(ezxml_child(phn, "isMessengerEnabled"));
if (strcmp(szMsgUsr, "true") == 0) {
szEmail = ezxml_txt(ezxml_child(phn, "number"));
- mir_snprintf(email, sizeof(email), "tel:%s", szEmail);
+ mir_snprintf(email, SIZEOF(email), "tel:%s", szEmail);
szEmail = email;
netId = NETID_MOB;
break;
@@ -1465,8 +1465,8 @@ void CMsnProto::MSN_ABUpdateDynamicItem(bool allowRecurse)
time(&timer);
tm *tmst = gmtime(&timer);
- char tmstr[32];
- mir_snprintf(tmstr, sizeof(tmstr), "%04u-%02u-%02uT%02u:%02u:%02uZ",
+ char tmstr[64];
+ mir_snprintf(tmstr, SIZEOF(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);