summaryrefslogtreecommitdiff
path: root/plugins/XSoundNotify/src/xsn_main.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-19 19:35:42 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-19 19:35:42 +0000
commit4c814798c7bc7f6a0f92c21b027b26290622aa2f (patch)
tree9bbfb38bd639f352300aa16ff7c45f5a9b2dba6d /plugins/XSoundNotify/src/xsn_main.cpp
parentf0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (diff)
SIZEOF replaced with more secure analog - _countof
git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/XSoundNotify/src/xsn_main.cpp')
-rw-r--r--plugins/XSoundNotify/src/xsn_main.cpp8
1 files changed, 4 insertions, 4 deletions
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);