From 4c814798c7bc7f6a0f92c21b027b26290622aa2f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Jun 2015 19:35:42 +0000 Subject: SIZEOF replaced with more secure analog - _countof git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tlen/src/tlen_muc.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'protocols/Tlen/src/tlen_muc.cpp') diff --git a/protocols/Tlen/src/tlen_muc.cpp b/protocols/Tlen/src/tlen_muc.cpp index 2b733f6285..1571b0d843 100644 --- a/protocols/Tlen/src/tlen_muc.cpp +++ b/protocols/Tlen/src/tlen_muc.cpp @@ -70,7 +70,7 @@ static char *getDisplayName(TlenProtocol *proto, const char *id) MCONTACT hContact; DBVARIANT dbv; if (!db_get(NULL, proto->m_szModuleName, "LoginServer", &dbv)) { - mir_snprintf(jid, SIZEOF(jid), "%s@%s", id, dbv.pszVal); + mir_snprintf(jid, _countof(jid), "%s@%s", id, dbv.pszVal); db_free(&dbv); if (((hContact=TlenHContactFromJID(proto, jid)) != NULL) || !mir_strcmp(id, proto->threadData->username)) { CONTACTINFO ci = { sizeof(ci) }; @@ -107,7 +107,7 @@ int TlenMUCRecvInvitation(TlenProtocol *proto, const char *roomId, const char *r char jid[256]; DBVARIANT dbv; if (!db_get(NULL, proto->m_szModuleName, "LoginServer", &dbv)) { - mir_snprintf(jid, SIZEOF(jid), "%s@%s", from, dbv.pszVal); + mir_snprintf(jid, _countof(jid), "%s@%s", from, dbv.pszVal); db_free(&dbv); } else { mir_strcpy(jid, from); @@ -119,7 +119,7 @@ int TlenMUCRecvInvitation(TlenProtocol *proto, const char *roomId, const char *r TLEN_LIST_ITEM *item; DBVARIANT dbv; if (!db_get(NULL, proto->m_szModuleName, "LoginServer", &dbv)) { - mir_snprintf(jid, SIZEOF(jid), "%s@%s", from, dbv.pszVal); + mir_snprintf(jid, _countof(jid), "%s@%s", from, dbv.pszVal); db_free(&dbv); } else { mir_strcpy(jid, from); @@ -190,7 +190,7 @@ static int TlenMUCSendQuery(TlenProtocol *proto, int type, const char *parent, i if (type == 3) { // find chat room by name char serialId[32]; TLEN_LIST_ITEM *item; - mir_snprintf(serialId, SIZEOF(serialId), TLEN_IQID"%d", TlenSerialNext(proto)); + mir_snprintf(serialId, _countof(serialId), TLEN_IQID"%d", TlenSerialNext(proto)); item = TlenListAdd(proto, LIST_SEARCH, serialId); item->roomName = mir_strdup(parent); TlenSend(proto, "", parent, serialId); @@ -236,7 +236,7 @@ INT_PTR TlenProtocol::MUCContactMenuHandleMUC(WPARAM wParam, LPARAM lParam) if ((hContact=wParam) != NULL && isOnline) { if (!db_get(hContact, m_szModuleName, "jid", &dbv)) { char serialId[32]; - mir_snprintf(serialId, SIZEOF(serialId), TLEN_IQID"%d", TlenSerialNext(this)); + mir_snprintf(serialId, _countof(serialId), TLEN_IQID"%d", TlenSerialNext(this)); item = TlenListAdd(this, LIST_INVITATIONS, serialId); item->nick = mir_strdup(dbv.pszVal); TlenSend(this, "

", serialId); -- cgit v1.2.3