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/Gadu-Gadu/src/gg_proto.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/Gadu-Gadu/src/gg_proto.cpp')
-rw-r--r-- | protocols/Gadu-Gadu/src/gg_proto.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index 509fddb0ff..8a98d9428c 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -40,7 +40,7 @@ GGPROTO::GGPROTO(const char* pszProtoName, const TCHAR* tszUserName) : // Register m_hNetlibUser user
TCHAR name[128];
- mir_sntprintf(name, SIZEOF(name), TranslateT("%s connection"), m_tszUserName);
+ mir_sntprintf(name, _countof(name), TranslateT("%s connection"), m_tszUserName);
NETLIBUSER nlu = { 0 };
nlu.cbSize = sizeof(nlu);
@@ -392,7 +392,7 @@ HWND GGPROTO::SearchAdvanced(HWND hwndDlg) // Fetch search data
TCHAR text[64];
- GetDlgItemText(hwndDlg, IDC_FIRSTNAME, text, SIZEOF(text));
+ GetDlgItemText(hwndDlg, IDC_FIRSTNAME, text, _countof(text));
if (mir_tstrlen(text))
{
T2Utf firstName_utf8(text);
@@ -401,7 +401,7 @@ HWND GGPROTO::SearchAdvanced(HWND hwndDlg) }
/* 1 */ szQuery.AppendChar('.');
- GetDlgItemText(hwndDlg, IDC_LASTNAME, text, SIZEOF(text));
+ GetDlgItemText(hwndDlg, IDC_LASTNAME, text, _countof(text));
if (mir_tstrlen(text))
{
T2Utf lastName_utf8(text);
@@ -410,7 +410,7 @@ HWND GGPROTO::SearchAdvanced(HWND hwndDlg) }
/* 2 */ szQuery.AppendChar('.');
- GetDlgItemText(hwndDlg, IDC_NICKNAME, text, SIZEOF(text));
+ GetDlgItemText(hwndDlg, IDC_NICKNAME, text, _countof(text));
if (mir_tstrlen(text))
{
T2Utf nickName_utf8(text);
@@ -419,7 +419,7 @@ HWND GGPROTO::SearchAdvanced(HWND hwndDlg) }
/* 3 */ szQuery.AppendChar('.');
- GetDlgItemText(hwndDlg, IDC_CITY, text, SIZEOF(text));
+ GetDlgItemText(hwndDlg, IDC_CITY, text, _countof(text));
if (mir_tstrlen(text))
{
T2Utf city_utf8(text);
@@ -428,7 +428,7 @@ HWND GGPROTO::SearchAdvanced(HWND hwndDlg) }
/* 4 */ szQuery.AppendChar('.');
- GetDlgItemText(hwndDlg, IDC_AGEFROM, text, SIZEOF(text));
+ GetDlgItemText(hwndDlg, IDC_AGEFROM, text, _countof(text));
if (mir_tstrlen(text))
{
int yearTo = _tstoi(text);
@@ -438,7 +438,7 @@ HWND GGPROTO::SearchAdvanced(HWND hwndDlg) int ay = lt->tm_year + 1900;
char age[16];
- GetDlgItemTextA(hwndDlg, IDC_AGETO, age, SIZEOF(age));
+ GetDlgItemTextA(hwndDlg, IDC_AGETO, age, _countof(age));
yearFrom = atoi(age);
// Count & fix ranges
|