diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-16 17:34:54 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-16 17:34:54 +0000 |
commit | b97306f8dc5e4f93bd3e6e5500a8b8338d6249a2 (patch) | |
tree | 2aadaa0640b4910b78b1e1e99718f220fbfa7622 /plugins/Ping/src/icmp.cpp | |
parent | 3dc4db00aa828d245e4f7a8a14233d624f3e2e7c (diff) |
cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@13625 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Ping/src/icmp.cpp')
-rw-r--r-- | plugins/Ping/src/icmp.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/Ping/src/icmp.cpp b/plugins/Ping/src/icmp.cpp index dfa0c86578..84dd47d272 100644 --- a/plugins/Ping/src/icmp.cpp +++ b/plugins/Ping/src/icmp.cpp @@ -5,15 +5,15 @@ ICMP *ICMP::instance = 0; #define BUFFER_SIZE (16 * (sizeof(ICMP_ECHO_REPLY) + sizeof(data)))
-ICMP::ICMP():
- timeout(2000),
- functions_loaded(false)
+ICMP::ICMP() :
+timeout(2000),
+functions_loaded(false)
{
WSAData wsaData;
if (WSAStartup(MAKEWORD(1, 1), &wsaData) != 0) {
WSACleanup();
return;
- }
+ }
buff = new char[BUFFER_SIZE];
functions_loaded = true;
@@ -24,7 +24,7 @@ void ICMP::stop() }
ICMP::~ICMP() {
- if(hIP) stop();
+ if (hIP) stop();
WSACleanup();
delete[] buff;
}
@@ -53,7 +53,7 @@ bool ICMP::ping(char *host, ICMP_ECHO_REPLY &reply) ipoi.Flags = 0;
ipoi.OptionsSize = 0;
ipoi.OptionsData = 0;
-
+
reply.Status = 0;
hIP = IcmpCreateFile();
@@ -81,11 +81,11 @@ bool ICMP::ping(char *host, ICMP_ECHO_REPLY &reply) }
ICMP *ICMP::get_instance() {
- if(!instance)
+ if (!instance)
instance = new ICMP();
return instance;
}
void ICMP::cleanup() {
- if(instance) delete instance;
+ if (instance) delete instance;
}
\ No newline at end of file |