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 --- plugins/XSoundNotify/src/xsn_main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/XSoundNotify/src/xsn_main.cpp') diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp index e54db97808..e33b915fae 100644 --- a/plugins/XSoundNotify/src/xsn_main.cpp +++ b/plugins/XSoundNotify/src/xsn_main.cpp @@ -71,12 +71,12 @@ void InitSelfSounds() Proto_EnumAccounts(&protoCount, &protos); for (int i = 0; i < protoCount; i++) { - for (int j = 0; j < SIZEOF(selfSounds); j++) { + for (int j = 0; j < _countof(selfSounds); j++) { char namebuf[128]; - mir_snprintf(namebuf, SIZEOF(namebuf), "%s%s", protos[i]->szModuleName, selfSounds[j].szName); + mir_snprintf(namebuf, _countof(namebuf), "%s%s", protos[i]->szModuleName, selfSounds[j].szName); TCHAR infobuf[256]; - mir_sntprintf(infobuf, SIZEOF(infobuf), _T("%s [%s]"), TranslateT("Self status"), protos[i]->tszAccountName); + mir_sntprintf(infobuf, _countof(infobuf), _T("%s [%s]"), TranslateT("Self status"), protos[i]->tszAccountName); SkinAddNewSoundExT(namebuf, infobuf, (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, selfSounds[j].iStatus, GSMDF_TCHAR)); } } @@ -86,7 +86,7 @@ static int ProtoAck(WPARAM, LPARAM lParam) { ACKDATA *ack = (ACKDATA*)lParam; if (ack != 0 && ack->szModule && ack->type == ACKTYPE_STATUS && ack->result == ACKRESULT_SUCCESS) { - for (int i = 0; i < SIZEOF(selfSounds); i++) { + for (int i = 0; i < _countof(selfSounds); i++) { if (selfSounds[i].iStatus == ack->lParam) { char buf[128]; mir_snprintf(buf, "%s%s", ack->szModule, selfSounds[i].szName); -- cgit v1.2.3