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 /protocols/IcqOscarJ/src/icq_clients.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 'protocols/IcqOscarJ/src/icq_clients.cpp')
-rw-r--r-- | protocols/IcqOscarJ/src/icq_clients.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/IcqOscarJ/src/icq_clients.cpp b/protocols/IcqOscarJ/src/icq_clients.cpp index 275dce0f04..0993175820 100644 --- a/protocols/IcqOscarJ/src/icq_clients.cpp +++ b/protocols/IcqOscarJ/src/icq_clients.cpp @@ -473,7 +473,7 @@ const char* CIcqProto::detectUserClient( else if (MatchCapability(caps, wLen, &capQipInfium)) {
mir_strcpy(szClientBuf, "QIP Infium");
if (dwFT1) {
- mir_snprintf(ver, SIZEOF(ver), " (%d)", dwFT1);
+ mir_snprintf(ver, _countof(ver), " (%d)", dwFT1);
mir_strcat(szClientBuf, ver);
}
if (dwFT2 == 0x0B)
@@ -484,7 +484,7 @@ const char* CIcqProto::detectUserClient( else if (MatchCapability(caps, wLen, &capQip2010, 12)) {
mir_strcpy(szClientBuf, "QIP 2010");
if (dwFT1) {
- mir_snprintf(ver, SIZEOF(ver), " (%d)", dwFT1);
+ mir_snprintf(ver, _countof(ver), " (%d)", dwFT1);
mir_strcat(szClientBuf, ver);
}
@@ -493,7 +493,7 @@ const char* CIcqProto::detectUserClient( else if (MatchCapability(caps, wLen, &capQip2012, 12)) {
mir_strcpy(szClientBuf, "QIP 2012");
if (dwFT1) {
- mir_snprintf(ver, SIZEOF(ver), " (%d)", dwFT1);
+ mir_snprintf(ver, _countof(ver), " (%d)", dwFT1);
mir_strcat(szClientBuf, ver);
}
@@ -507,7 +507,7 @@ const char* CIcqProto::detectUserClient( mir_snprintf(szClientBuf, 64, cliQip, ver);
if (dwFT1 && dwFT2 == 0x0E) {
- mir_snprintf(ver, SIZEOF(ver), " (%d%d%d%d)", dwFT1 >> 0x18, (dwFT1 >> 0x10) & 0xFF, (dwFT1 >> 0x08) & 0xFF, dwFT1 & 0xFF);
+ mir_snprintf(ver, _countof(ver), " (%d%d%d%d)", dwFT1 >> 0x18, (dwFT1 >> 0x10) & 0xFF, (dwFT1 >> 0x08) & 0xFF, dwFT1 & 0xFF);
mir_strcat(szClientBuf, ver);
}
szClient = szClientBuf;
@@ -528,7 +528,7 @@ const char* CIcqProto::detectUserClient( if (dwFT2 == 0x0FFFF0011 && dwFT3 == 0x1100FFFF && (dwFT1 >> 0x18)) {
char ver[16];
- mir_snprintf(ver, SIZEOF(ver), " %d.%d", dwFT1 >> 0x18, (dwFT1 >> 0x10) & 0xFF);
+ mir_snprintf(ver, _countof(ver), " %d.%d", dwFT1 >> 0x18, (dwFT1 >> 0x10) & 0xFF);
if ((dwFT1 & 0xFF) == 0x0B)
mir_strcat(ver, " Beta");
mir_strcat(szClientBuf, ver);
@@ -943,7 +943,7 @@ const char* CIcqProto::detectUserClient( capstr *capId = MatchCapability(caps, wLen, &capMimPack, 4);
if (capId) {
char szPack[16];
- mir_snprintf(szPack, SIZEOF(szPack), " [%.12s]", (*capId) + 4);
+ mir_snprintf(szPack, _countof(szPack), " [%.12s]", (*capId) + 4);
// make sure client string is not constant
if (szClient != szClientBuf) {
|