summaryrefslogtreecommitdiff
path: root/plugins/Ping/src/utils.cpp
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-12-08 22:13:57 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-12-08 22:13:57 +0000
commit13eb83bea655c3302c74a82d826d75bceb9232a2 (patch)
treeea992cbd9002e078a06e9fe65a73698eec4fbc22 /plugins/Ping/src/utils.cpp
parentef741fcb36d679b094e44d01714f423c34357383 (diff)
code cleanup around mir_snprintf
git-svn-id: http://svn.miranda-ng.org/main/trunk@11285 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Ping/src/utils.cpp')
-rw-r--r--plugins/Ping/src/utils.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/Ping/src/utils.cpp b/plugins/Ping/src/utils.cpp
index 814e4d6f81..8aaf1d21b6 100644
--- a/plugins/Ping/src/utils.cpp
+++ b/plugins/Ping/src/utils.cpp
@@ -237,30 +237,30 @@ INT_PTR DblClick(WPARAM wParam, LPARAM lParam) {
void import_ping_address(int index, PINGADDRESS &pa) {
DBVARIANT dbv;
char buf[256];
- mir_snprintf(buf, 256, "Address%d", index);
+ mir_snprintf(buf, SIZEOF(buf), "Address%d", index);
if(!db_get_ts(0, "PingPlug", buf, &dbv)) {
_tcsncpy(pa.pszName, dbv.ptszVal, MAX_PINGADDRESS_STRING_LENGTH);
db_free(&dbv);
} else
_tcsncpy(pa.pszName, TranslateT("Unknown Address"), MAX_PINGADDRESS_STRING_LENGTH);
- mir_snprintf(buf, 256, "Label%d", index);
+ mir_snprintf(buf, SIZEOF(buf), "Label%d", index);
if(!db_get_ts(0, "PingPlug", buf, &dbv)) {
_tcsncpy(pa.pszLabel, dbv.ptszVal, MAX_PINGADDRESS_STRING_LENGTH);
db_free(&dbv);
} else
_tcsncpy(pa.pszLabel, TranslateT("Unknown"), MAX_PINGADDRESS_STRING_LENGTH);
- mir_snprintf(buf, 256, "Port%d", index);
+ mir_snprintf(buf, SIZEOF(buf), "Port%d", index);
pa.port = (int)db_get_dw(0, "PingPlug", buf, -1);
- mir_snprintf(buf, 256, "Proto%d", index);
+ mir_snprintf(buf, SIZEOF(buf), "Proto%d", index);
if(!db_get_s(0, "PingPlug", buf, &dbv)) {
strncpy(pa.pszProto, dbv.pszVal, MAX_PINGADDRESS_STRING_LENGTH);
db_free(&dbv);
- mir_snprintf(buf, 256, "Status%d", index);
+ mir_snprintf(buf, SIZEOF(buf), "Status%d", index);
pa.set_status = db_get_w(0, "PingPlug", buf, ID_STATUS_ONLINE);
- mir_snprintf(buf, 256, "Status2%d", index);
+ mir_snprintf(buf, SIZEOF(buf), "Status2%d", index);
pa.get_status = db_get_w(0, "PingPlug", buf, ID_STATUS_OFFLINE);
} else
pa.pszProto[0] = '\0';
@@ -274,7 +274,7 @@ void import_ping_address(int index, PINGADDRESS &pa) {
pa.pszParams[0] = '\0';
pa.item_id = 0;
- mir_snprintf(buf, 256, "Enabled%d", index);
+ mir_snprintf(buf, SIZEOF(buf), "Enabled%d", index);
if(db_get_b(0, "PingPlug", buf, 1) == 1)
pa.status = PS_NOTRESPONDING;
else