summaryrefslogtreecommitdiff
path: root/plugins/Ping
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Ping')
-rw-r--r--plugins/Ping/src/collection.h19
-rw-r--r--plugins/Ping/src/utils.cpp13
2 files changed, 10 insertions, 22 deletions
diff --git a/plugins/Ping/src/collection.h b/plugins/Ping/src/collection.h
index e19c5874d4..df6fff15c2 100644
--- a/plugins/Ping/src/collection.h
+++ b/plugins/Ping/src/collection.h
@@ -155,19 +155,16 @@ public:
virtual const bool pop(T &val)
{
- if (!head) return false;
+ if (!head)
+ return false;
ListNode<T> *n = head;
- if (head) {
- head = head->next;
- if (n == tail) tail = nullptr;
- val = n->val;
- delete n;
- Collection<T>::count--;
- return true;
- }
- else
- return false;
+ head = head->next;
+ if (n == tail) tail = nullptr;
+ val = n->val;
+ delete n;
+ Collection<T>::count--;
+ return true;
}
};
diff --git a/plugins/Ping/src/utils.cpp b/plugins/Ping/src/utils.cpp
index de7a1d0bf9..43c777f315 100644
--- a/plugins/Ping/src/utils.cpp
+++ b/plugins/Ping/src/utils.cpp
@@ -16,15 +16,7 @@ LRESULT CALLBACK NullWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l
return DefWindowProc(hWnd, message, wParam, lParam);
}
-static INT_PTR CALLBACK sttMainThreadCallback(void *dwParam)
-{
- POPUPDATAW* ppd = (POPUPDATAW*)dwParam;
- PUAddPopupW(ppd);
- free(ppd);
- return 0;
-}
-
-void __stdcall ShowPopup(wchar_t *line1, wchar_t *line2, int flags)
+void __stdcall ShowPopup(wchar_t *line1, wchar_t *line2, int)
{
if (Miranda_IsTerminated())
return;
@@ -63,8 +55,7 @@ INT_PTR PluginPing(WPARAM, LPARAM lParam)
clock_t start_tcp = clock();
//GetLocalTime(&systime);
- NETLIBOPENCONNECTION conn = { 0 };
- conn.cbSize = sizeof(NETLIBOPENCONNECTION);
+ NETLIBOPENCONNECTION conn = {};
conn.szHost = mir_u2a(pa->pszName);
conn.wPort = pa->port;
conn.timeout = options.ping_timeout;