summaryrefslogtreecommitdiff
path: root/plugins/Non-IM Contact/src/timer.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/Non-IM Contact/src/timer.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/Non-IM Contact/src/timer.cpp')
-rw-r--r--plugins/Non-IM Contact/src/timer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/Non-IM Contact/src/timer.cpp b/plugins/Non-IM Contact/src/timer.cpp
index cbd5ba7f29..5f19b802f0 100644
--- a/plugins/Non-IM Contact/src/timer.cpp
+++ b/plugins/Non-IM Contact/src/timer.cpp
@@ -24,7 +24,7 @@ void timerFunc(void *di)
/* update the web pages*/
for (int i = 0;; i++) {
mir_snprintf(fn, "fn%d", i);
- if (!db_get_static(NULL, MODNAME, fn, text, SIZEOF(text)))
+ if (!db_get_static(NULL, MODNAME, fn, text, _countof(text)))
break;
if (!strncmp("http://", text, mir_strlen("http://")) || !strncmp("https://", text, mir_strlen("https://"))) {
@@ -32,7 +32,7 @@ void timerFunc(void *di)
int timer = db_get_w(NULL, MODNAME, fn, 60);
if (timer && !(timerCount % timer)) {
if (!InternetDownloadFile(text)) {
- mir_snprintf(szFileName, SIZEOF(szFileName), "%s\\plugins\\fn%d.html", getMimDir(temp), i);
+ mir_snprintf(szFileName, _countof(szFileName), "%s\\plugins\\fn%d.html", getMimDir(temp), i);
savehtml(szFileName);
}
}
@@ -43,7 +43,7 @@ void timerFunc(void *di)
for (MCONTACT hContact = db_find_first(MODNAME); hContact; hContact = db_find_next(hContact, MODNAME)) {
int timer = db_get_w(hContact, MODNAME, "Timer", 15);
if (timer && !(timerCount % timer))
- if (db_get_static(hContact, MODNAME, "Name", text, SIZEOF(text)))
+ if (db_get_static(hContact, MODNAME, "Name", text, _countof(text)))
replaceAllStrings(hContact);
}
}