diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-19 19:35:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-19 19:35:42 +0000 |
commit | 4c814798c7bc7f6a0f92c21b027b26290622aa2f (patch) | |
tree | 9bbfb38bd639f352300aa16ff7c45f5a9b2dba6d /plugins/Ping/src/pinglist.cpp | |
parent | f0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (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/Ping/src/pinglist.cpp')
-rw-r--r-- | plugins/Ping/src/pinglist.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/Ping/src/pinglist.cpp b/plugins/Ping/src/pinglist.cpp index cbd590c503..51aa6f73a3 100644 --- a/plugins/Ping/src/pinglist.cpp +++ b/plugins/Ping/src/pinglist.cpp @@ -116,13 +116,13 @@ bool read_ping_address(PINGADDRESS &pa) { DBVARIANT dbv;
if (!db_get_ts(0, buff, "Address", &dbv)) {
- mir_tstrncpy(pa.pszName, dbv.ptszVal, SIZEOF(pa.pszName));
+ mir_tstrncpy(pa.pszName, dbv.ptszVal, _countof(pa.pszName));
db_free(&dbv);
}
else return false;
if (!db_get_ts(0, buff, "Label", &dbv)) {
- mir_tstrncpy(pa.pszLabel, dbv.ptszVal, SIZEOF(pa.pszLabel));
+ mir_tstrncpy(pa.pszLabel, dbv.ptszVal, _countof(pa.pszLabel));
db_free(&dbv);
}
else return false;
@@ -133,19 +133,19 @@ bool read_ping_address(PINGADDRESS &pa) { pa.port = (int)db_get_dw(0, buff, "Port", -1);
if (!db_get_s(0, buff, "Proto", &dbv)) {
- mir_strncpy(pa.pszProto, dbv.pszVal, SIZEOF(pa.pszProto));
+ mir_strncpy(pa.pszProto, dbv.pszVal, _countof(pa.pszProto));
db_free(&dbv);
}
else pa.pszProto[0] = '\0';
if (!db_get_ts(0, buff, "Command", &dbv)) {
- mir_tstrncpy(pa.pszCommand, dbv.ptszVal, SIZEOF(pa.pszCommand));
+ mir_tstrncpy(pa.pszCommand, dbv.ptszVal, _countof(pa.pszCommand));
db_free(&dbv);
}
else
pa.pszCommand[0] = '\0';
if (!db_get_ts(0, buff, "CommandParams", &dbv)) {
- mir_tstrncpy(pa.pszParams, dbv.ptszVal, SIZEOF(pa.pszParams));
+ mir_tstrncpy(pa.pszParams, dbv.ptszVal, _countof(pa.pszParams));
db_free(&dbv);
}
else
|