summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-26 18:24:10 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-26 18:24:10 +0000
commitffeae3b58ae49397f62cb733c77f565ac4070223 (patch)
tree2c037284535c00a08069adcb1a1ef16e44889d4a /protocols
parent944753ba4f0e2b924215fab81e72abb933942df3 (diff)
various code cleaning considering protocols' declarations
git-svn-id: http://svn.miranda-ng.org/main/trunk@2509 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/AimOscar/src/aim.cpp4
-rw-r--r--protocols/FacebookRM/src/main.cpp3
-rw-r--r--protocols/Gadu-Gadu/src/gg.cpp3
-rw-r--r--protocols/IRCG/src/main.cpp3
-rw-r--r--protocols/IcqOscarJ/src/init.cpp3
-rw-r--r--protocols/JabberG/src/jabber.cpp3
-rw-r--r--protocols/MRA/src/Mra.cpp3
-rw-r--r--protocols/MSN/src/msn.cpp3
-rw-r--r--protocols/NewsAggregator/Src/NewsAggregator.cpp3
-rw-r--r--protocols/Omegle/src/main.cpp3
-rw-r--r--protocols/Quotes/src/Forex.cpp3
-rw-r--r--protocols/Tlen/src/tlen.cpp5
-rw-r--r--protocols/Weather/src/weather.cpp3
-rw-r--r--protocols/YAMN/src/main.cpp3
-rw-r--r--protocols/Yahoo/src/main.cpp3
15 files changed, 15 insertions, 33 deletions
diff --git a/protocols/AimOscar/src/aim.cpp b/protocols/AimOscar/src/aim.cpp
index e7880dea40..c619194e18 100644
--- a/protocols/AimOscar/src/aim.cpp
+++ b/protocols/AimOscar/src/aim.cpp
@@ -102,13 +102,11 @@ static int protoUninit(PROTO_INTERFACE* ppro)
extern "C" int __declspec(dllexport) Load(void)
{
-
mir_getLP(&pluginInfo);
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
- PROTOCOLDESCRIPTOR pd = {0};
- pd.cbSize = sizeof(pd);
+ PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
pd.szName = "AIM";
pd.type = PROTOTYPE_PROTOCOL;
pd.fnInit = protoInit;
diff --git a/protocols/FacebookRM/src/main.cpp b/protocols/FacebookRM/src/main.cpp
index 23e517d0fd..41d4a909f6 100644
--- a/protocols/FacebookRM/src/main.cpp
+++ b/protocols/FacebookRM/src/main.cpp
@@ -97,8 +97,7 @@ extern "C" int __declspec(dllexport) Load(void)
pcli = reinterpret_cast<CLIST_INTERFACE*>( CallService(
MS_CLIST_RETRIEVE_INTERFACE,0,reinterpret_cast<LPARAM>(g_hInstance)));
- PROTOCOLDESCRIPTOR pd = { 0 };
- pd.cbSize = sizeof(pd);
+ PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
pd.szName = "Facebook";
pd.type = PROTOTYPE_PROTOCOL;
pd.fnInit = protoInit;
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp
index c6c5b9715a..a27b781590 100644
--- a/protocols/Gadu-Gadu/src/gg.cpp
+++ b/protocols/Gadu-Gadu/src/gg.cpp
@@ -372,8 +372,7 @@ extern "C" int __declspec(dllexport) Load(void)
hHookPreShutdown = HookEvent(ME_SYSTEM_PRESHUTDOWN, gg_preshutdown);
// Prepare protocol name
- PROTOCOLDESCRIPTOR pd = { 0 };
- pd.cbSize = sizeof(pd);
+ PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
pd.szName = GGDEF_PROTO;
pd.fnInit = (pfnInitProto)gg_proto_init;
pd.fnUninit = (pfnUninitProto)gg_proto_uninit;
diff --git a/protocols/IRCG/src/main.cpp b/protocols/IRCG/src/main.cpp
index ea802d43cd..0a2a5d70df 100644
--- a/protocols/IRCG/src/main.cpp
+++ b/protocols/IRCG/src/main.cpp
@@ -98,8 +98,7 @@ extern "C" int __declspec(dllexport) Load( )
InitContactMenus();
// register protocol
- PROTOCOLDESCRIPTOR pd = { 0 };
- pd.cbSize = sizeof( pd );
+ PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
pd.szName = "IRC";
pd.type = PROTOTYPE_PROTOCOL;
pd.fnInit = ( pfnInitProto )ircProtoInit;
diff --git a/protocols/IcqOscarJ/src/init.cpp b/protocols/IcqOscarJ/src/init.cpp
index 63b2b7fb21..6ee98fa8bb 100644
--- a/protocols/IcqOscarJ/src/init.cpp
+++ b/protocols/IcqOscarJ/src/init.cpp
@@ -91,8 +91,7 @@ extern "C" int __declspec(dllexport) Load(void)
pcli = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)hInst);
// Register the module
- PROTOCOLDESCRIPTOR pd = {0};
- pd.cbSize = sizeof(pd);
+ PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
pd.szName = ICQ_PROTOCOL_NAME;
pd.type = PROTOTYPE_PROTOCOL;
pd.fnInit = icqProtoInit;
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp
index 055d67929d..7eae1eb6d4 100644
--- a/protocols/JabberG/src/jabber.cpp
+++ b/protocols/JabberG/src/jabber.cpp
@@ -233,8 +233,7 @@ extern "C" int __declspec(dllexport) Load()
pcli = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)hInst);
// Register protocol module
- PROTOCOLDESCRIPTOR pd = { 0 };
- pd.cbSize = sizeof(PROTOCOLDESCRIPTOR);
+ PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
pd.szName = "JABBER";
pd.fnInit = (pfnInitProto)jabberProtoInit;
pd.fnUninit = (pfnUninitProto)jabberProtoUninit;
diff --git a/protocols/MRA/src/Mra.cpp b/protocols/MRA/src/Mra.cpp
index 082a2a9332..6a91a143c3 100644
--- a/protocols/MRA/src/Mra.cpp
+++ b/protocols/MRA/src/Mra.cpp
@@ -110,8 +110,7 @@ extern "C" MRA_API int Load(void)
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
HookEvent(ME_SYSTEM_PRESHUTDOWN, OnPreShutdown);
- PROTOCOLDESCRIPTOR pd = {0};
- pd.cbSize = sizeof(pd);
+ PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
pd.szName = "MRA";
pd.type = PROTOTYPE_PROTOCOL;
pd.fnInit = (pfnInitProto)mraProtoInit;
diff --git a/protocols/MSN/src/msn.cpp b/protocols/MSN/src/msn.cpp
index 0b1dfbf957..ca1e2cd041 100644
--- a/protocols/MSN/src/msn.cpp
+++ b/protocols/MSN/src/msn.cpp
@@ -120,8 +120,7 @@ extern "C" int __declspec(dllexport) Load(void)
hMooduleLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
- PROTOCOLDESCRIPTOR pd = {0};
- pd.cbSize = sizeof(pd);
+ PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
pd.szName = "MSN";
pd.fnInit = (pfnInitProto)msnProtoInit;
pd.fnUninit = (pfnUninitProto)msnProtoUninit;
diff --git a/protocols/NewsAggregator/Src/NewsAggregator.cpp b/protocols/NewsAggregator/Src/NewsAggregator.cpp
index 3c05847739..3ab146ccbb 100644
--- a/protocols/NewsAggregator/Src/NewsAggregator.cpp
+++ b/protocols/NewsAggregator/Src/NewsAggregator.cpp
@@ -86,8 +86,7 @@ extern "C" __declspec(dllexport) int Load(void)
hChangeFeedDlgList = (HANDLE) CallService(MS_UTILS_ALLOCWINDOWLIST,0,0);
// register weather protocol
- PROTOCOLDESCRIPTOR pd = {0};
- pd.cbSize = PROTOCOLDESCRIPTOR_V3_SIZE;
+ PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE };
pd.szName = MODULE;
pd.type = PROTOTYPE_PROTOCOL;
CallService(MS_PROTO_REGISTERMODULE,0,(LPARAM)&pd);
diff --git a/protocols/Omegle/src/main.cpp b/protocols/Omegle/src/main.cpp
index 32771e22be..ac0ad7e466 100644
--- a/protocols/Omegle/src/main.cpp
+++ b/protocols/Omegle/src/main.cpp
@@ -97,8 +97,7 @@ extern "C" int __declspec(dllexport) Load(void)
pcli = reinterpret_cast<CLIST_INTERFACE*>( CallService(
MS_CLIST_RETRIEVE_INTERFACE,0,reinterpret_cast<LPARAM>(g_hInstance)));
- PROTOCOLDESCRIPTOR pd = { 0 };
- pd.cbSize = sizeof(pd);
+ PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
pd.szName = "Omegle";
pd.type = PROTOTYPE_PROTOCOL;
pd.fnInit = protoInit;
diff --git a/protocols/Quotes/src/Forex.cpp b/protocols/Quotes/src/Forex.cpp
index 063e812b04..d5cbf7eb42 100644
--- a/protocols/Quotes/src/Forex.cpp
+++ b/protocols/Quotes/src/Forex.cpp
@@ -421,8 +421,7 @@ extern "C"
Quotes_IconsInit();
- PROTOCOLDESCRIPTOR pd = {0};
- pd.cbSize = /*sizeof(pd)*/PROTOCOLDESCRIPTOR_V3_SIZE;
+ PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE };
pd.szName = QUOTES_PROTOCOL_NAME;
pd.type = PROTOTYPE_PROTOCOL;
// pd.fnInit = protoInit;
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp
index 0267dd5bb5..d8a0a00652 100644
--- a/protocols/Tlen/src/tlen.cpp
+++ b/protocols/Tlen/src/tlen.cpp
@@ -495,8 +495,6 @@ static int tlenProtoUninit( TlenProtocol* ppro )
extern "C" int __declspec(dllexport) Load(void)
{
- PROTOCOLDESCRIPTOR pd;
-
mir_getLP( &pluginInfoEx );
DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &hMainThread, THREAD_SET_CONTEXT, FALSE, 0);
@@ -506,8 +504,7 @@ extern "C" int __declspec(dllexport) Load(void)
TlenRegisterIcons();
// Register protocol module
- ZeroMemory(&pd, sizeof(PROTOCOLDESCRIPTOR));
- pd.cbSize = sizeof(PROTOCOLDESCRIPTOR);
+ PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
pd.szName = "TLEN";
pd.fnInit = ( pfnInitProto )tlenProtoInit;
pd.fnUninit = ( pfnUninitProto )tlenProtoUninit;
diff --git a/protocols/Weather/src/weather.cpp b/protocols/Weather/src/weather.cpp
index b1d34561fb..299f9ecde6 100644
--- a/protocols/Weather/src/weather.cpp
+++ b/protocols/Weather/src/weather.cpp
@@ -250,8 +250,7 @@ extern "C" int __declspec(dllexport) Load(void)
hUpdateMutex = CreateMutex(NULL, FALSE, NULL);
// register weather protocol
- PROTOCOLDESCRIPTOR pd = {0};
- pd.cbSize = PROTOCOLDESCRIPTOR_V3_SIZE;
+ PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE };
pd.szName = WEATHERPROTONAME;
pd.type = PROTOTYPE_PROTOCOL;
CallService(MS_PROTO_REGISTERMODULE,0,(LPARAM)&pd);
diff --git a/protocols/YAMN/src/main.cpp b/protocols/YAMN/src/main.cpp
index 0d05534f3c..4fa4991e8c 100644
--- a/protocols/YAMN/src/main.cpp
+++ b/protocols/YAMN/src/main.cpp
@@ -390,8 +390,7 @@ extern "C" int __declspec(dllexport) Load(void)
} }
// Registering YAMN as protocol
- PROTOCOLDESCRIPTOR pd = {0};
- pd.cbSize = PROTOCOLDESCRIPTOR_V3_SIZE;
+ PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE };
pd.szName = YAMN_DBMODULE;
pd.type = PROTOTYPE_PROTOCOL;
CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd);
diff --git a/protocols/Yahoo/src/main.cpp b/protocols/Yahoo/src/main.cpp
index df432b5223..2d3b3dd715 100644
--- a/protocols/Yahoo/src/main.cpp
+++ b/protocols/Yahoo/src/main.cpp
@@ -97,8 +97,7 @@ extern "C" int __declspec(dllexport)Load(void)
{
mir_getLP( &pluginInfo );
- PROTOCOLDESCRIPTOR pd = { 0 };
- pd.cbSize = sizeof(pd);
+ PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
pd.szName = "YAHOO";
pd.type = PROTOTYPE_PROTOCOL;
pd.fnInit = ( pfnInitProto )yahooProtoInit;