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/TrafficCounter/src/TrafficCounter.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/TrafficCounter/src/TrafficCounter.cpp')
-rw-r--r-- | plugins/TrafficCounter/src/TrafficCounter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp index 7c54e5f271..5fff652c5f 100644 --- a/plugins/TrafficCounter/src/TrafficCounter.cpp +++ b/plugins/TrafficCounter/src/TrafficCounter.cpp @@ -214,7 +214,7 @@ int TrafficCounterModulesLoaded(WPARAM wParam, LPARAM lParam) if (db_get_ts(NULL, TRAFFIC_SETTINGS_GROUP, SETTINGS_COUNTER_FORMAT, &dbv) == 0)
{
if(mir_tstrlen(dbv.ptszVal) > 0)
- mir_tstrncpy(Traffic_CounterFormat, dbv.ptszVal, SIZEOF(Traffic_CounterFormat));
+ mir_tstrncpy(Traffic_CounterFormat, dbv.ptszVal, _countof(Traffic_CounterFormat));
//
db_free(&dbv);
}
@@ -232,7 +232,7 @@ int TrafficCounterModulesLoaded(WPARAM wParam, LPARAM lParam) if (db_get_ts(NULL, TRAFFIC_SETTINGS_GROUP, SETTINGS_TOOLTIP_FORMAT, &dbv) == 0)
{
if(mir_tstrlen(dbv.ptszVal) > 0)
- mir_tstrncpy(Traffic_TooltipFormat, dbv.ptszVal, SIZEOF(Traffic_TooltipFormat));
+ mir_tstrncpy(Traffic_TooltipFormat, dbv.ptszVal, _countof(Traffic_TooltipFormat));
//
db_free(&dbv);
}
@@ -1138,7 +1138,7 @@ void NotifyOnSend(void) ppd.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
_tcsncpy(ppd.lptzContactName, TranslateT("Traffic counter notification"), MAX_CONTACTNAME);
//
- mir_sntprintf(ppd.lptzText, SIZEOF(ppd.lptzText), TranslateT("%d kilobytes sent"),
+ mir_sntprintf(ppd.lptzText, _countof(ppd.lptzText), TranslateT("%d kilobytes sent"),
notify_send_size = OverallInfo.CurrentSentTraffic >> 10);
//
ppd.colorBack = Traffic_PopupBkColor;
@@ -1157,7 +1157,7 @@ void NotifyOnRecv(void) ppd.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
_tcsncpy(ppd.lptzContactName, TranslateT("Traffic counter notification"),MAX_CONTACTNAME);
//
- mir_sntprintf(ppd.lptzText, SIZEOF(ppd.lptzText), TranslateT("%d kilobytes received"),
+ mir_sntprintf(ppd.lptzText, _countof(ppd.lptzText), TranslateT("%d kilobytes received"),
notify_recv_size = OverallInfo.CurrentRecvTraffic >> 10);
//
ppd.colorBack = Traffic_PopupBkColor;
|