summaryrefslogtreecommitdiff
path: root/plugins/Ping/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-01-24 18:53:43 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-01-24 18:53:43 +0300
commitc8629f370b4ce6d72857e802b10d92b64ce94454 (patch)
tree050186a3899781f951576948e6d17f78e8988518 /plugins/Ping/src
parentece3c2433832d935c0634a72bac1a7b948b04b44 (diff)
minor code cleaning
Diffstat (limited to 'plugins/Ping/src')
-rw-r--r--plugins/Ping/src/pinglist.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/Ping/src/pinglist.cpp b/plugins/Ping/src/pinglist.cpp
index 3d62301a8b..056588502e 100644
--- a/plugins/Ping/src/pinglist.cpp
+++ b/plugins/Ping/src/pinglist.cpp
@@ -62,7 +62,7 @@ void write_ping_addresses()
{
int index = 0;
for (auto &it : list_items) {
- it.index = index;
+ it.index = index++;
write_ping_address(it);
}
@@ -88,7 +88,8 @@ bool read_ping_address(PINGADDRESS &pa)
mir_snprintf(buff, "PING_DEST_%d", index);
// return if not more contacts, or only deleted contacts remaining
- if ((pa.item_id = db_get_dw(0, buff, "Id", 0)) == 0) return false;
+ if ((pa.item_id = db_get_dw(0, buff, "Id", 0)) == 0)
+ return false;
DBVARIANT dbv;
if (!db_get_ws(0, buff, "Address", &dbv)) {
@@ -118,14 +119,13 @@ bool read_ping_address(PINGADDRESS &pa)
mir_wstrncpy(pa.pszCommand, dbv.pwszVal, _countof(pa.pszCommand));
db_free(&dbv);
}
- else
- pa.pszCommand[0] = '\0';
+ else pa.pszCommand[0] = '\0';
+
if (!db_get_ws(0, buff, "CommandParams", &dbv)) {
mir_wstrncpy(pa.pszParams, dbv.pwszVal, _countof(pa.pszParams));
db_free(&dbv);
}
- else
- pa.pszParams[0] = '\0';
+ else pa.pszParams[0] = '\0';
pa.set_status = db_get_w(0, buff, "SetStatus", ID_STATUS_ONLINE);
pa.get_status = db_get_w(0, buff, "GetStatus", ID_STATUS_OFFLINE);