summaryrefslogtreecommitdiff
path: root/plugins/Ping/src/pingthread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Ping/src/pingthread.cpp')
-rw-r--r--plugins/Ping/src/pingthread.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp
index c0465a06a0..71e4f54b16 100644
--- a/plugins/Ping/src/pingthread.cpp
+++ b/plugins/Ping/src/pingthread.cpp
@@ -115,9 +115,9 @@ void __cdecl sttCheckStatusThreadProc(void *vp)
pa.item_id = i->item_id;
pa.miss_count = i->miss_count;
pa.port = i->port;
- mir_tstrncpy(pa.pszLabel, i->pszLabel, SIZEOF(pa.pszLabel));
- mir_tstrncpy(pa.pszName, i->pszName, SIZEOF(pa.pszName));
- mir_strncpy(pa.pszProto, i->pszProto, SIZEOF(pa.pszProto));
+ mir_tstrncpy(pa.pszLabel, i->pszLabel, _countof(pa.pszLabel));
+ mir_tstrncpy(pa.pszName, i->pszName, _countof(pa.pszName));
+ mir_strncpy(pa.pszProto, i->pszProto, _countof(pa.pszProto));
pa.set_status = i->set_status;
pa.status = i->status;
break;
@@ -317,9 +317,9 @@ void CALLBACK TimerProc(
{
TCHAR TBcapt[255];
if (total > 0)
- mir_sntprintf(TBcapt, SIZEOF(TBcapt), _T("Ping (%d/%d)"), upCount, total);
+ mir_sntprintf(TBcapt, _countof(TBcapt), _T("Ping (%d/%d)"), upCount, total);
else
- mir_sntprintf(TBcapt, SIZEOF(TBcapt), _T("Ping"));
+ mir_sntprintf(TBcapt, _countof(TBcapt), _T("Ping"));
CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_TBNAME | FO_TCHAR, frame_id), (LPARAM)TBcapt);
CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_TBTIPNAME | FO_TCHAR, frame_id), (LPARAM)TBcapt);
@@ -1007,27 +1007,27 @@ void InitList()
{
font_id.cbSize = sizeof(FontIDT);
- mir_tstrncpy(font_id.group, LPGENT("Ping"), SIZEOF(font_id.group));
- mir_tstrncpy(font_id.name, LPGENT("List"), SIZEOF(font_id.name));
- mir_strncpy(font_id.dbSettingsGroup, "PING", SIZEOF(font_id.dbSettingsGroup));
- mir_strncpy(font_id.prefix, "Font", SIZEOF(font_id.prefix));
- mir_tstrncpy(font_id.backgroundGroup, _T("Ping"), SIZEOF(font_id.backgroundGroup));
- mir_tstrncpy(font_id.backgroundName, _T("Background"), SIZEOF(font_id.backgroundName));
+ mir_tstrncpy(font_id.group, LPGENT("Ping"), _countof(font_id.group));
+ mir_tstrncpy(font_id.name, LPGENT("List"), _countof(font_id.name));
+ mir_strncpy(font_id.dbSettingsGroup, "PING", _countof(font_id.dbSettingsGroup));
+ mir_strncpy(font_id.prefix, "Font", _countof(font_id.prefix));
+ mir_tstrncpy(font_id.backgroundGroup, _T("Ping"), _countof(font_id.backgroundGroup));
+ mir_tstrncpy(font_id.backgroundName, _T("Background"), _countof(font_id.backgroundName));
font_id.order = 0;
font_id.flags = FIDF_DEFAULTVALID;
font_id.deffontsettings.charset = DEFAULT_CHARSET;
font_id.deffontsettings.size = -14;
font_id.deffontsettings.style = 0;
font_id.deffontsettings.colour = RGB(255, 255, 255);
- mir_tstrncpy(font_id.deffontsettings.szFace, _T("Tahoma"), SIZEOF(font_id.deffontsettings.szFace));
+ mir_tstrncpy(font_id.deffontsettings.szFace, _T("Tahoma"), _countof(font_id.deffontsettings.szFace));
FontRegisterT(&font_id);
bk_col_id.cbSize = sizeof(ColourIDT);
- mir_tstrncpy(bk_col_id.group, _T("Ping"), SIZEOF(bk_col_id.group));
- mir_tstrncpy(bk_col_id.name, _T("Background"), SIZEOF(bk_col_id.name));
- mir_strncpy(bk_col_id.dbSettingsGroup, "PING", SIZEOF(bk_col_id.dbSettingsGroup));
- mir_strncpy(bk_col_id.setting, "BgColor", SIZEOF(bk_col_id.setting));
+ mir_tstrncpy(bk_col_id.group, _T("Ping"), _countof(bk_col_id.group));
+ mir_tstrncpy(bk_col_id.name, _T("Background"), _countof(bk_col_id.name));
+ mir_strncpy(bk_col_id.dbSettingsGroup, "PING", _countof(bk_col_id.dbSettingsGroup));
+ mir_strncpy(bk_col_id.setting, "BgColor", _countof(bk_col_id.setting));
bk_col_id.defcolour = RGB(0, 0, 0);
ColourRegisterT(&bk_col_id);