diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/AVS/src/main.cpp | 2 | ||||
-rw-r--r-- | plugins/CryptoPP/src/main.cpp | 4 | ||||
-rw-r--r-- | plugins/CyrTranslit/src/TransliterationProtocol.cpp | 9 | ||||
-rw-r--r-- | plugins/FileAsMessage/src/main.cpp | 4 | ||||
-rw-r--r-- | plugins/MetaContacts/src/meta_main.cpp | 16 | ||||
-rw-r--r-- | plugins/MirOTR/MirOTR/src/dllmain.cpp | 3 | ||||
-rwxr-xr-x | plugins/New_GPG/src/init.cpp | 7 | ||||
-rw-r--r-- | plugins/SecureIM/src/main.cpp | 4 |
8 files changed, 16 insertions, 33 deletions
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index 251c612c41..54eb6892a4 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -1949,7 +1949,7 @@ static void LoadDefaultInfo() g_ProtoPictures.insert(pce);
}
-static void LoadProtoInfo( PROTOCOLDESCRIPTOR* proto )
+static void LoadProtoInfo(PROTOCOLDESCRIPTOR* proto)
{
if ( proto->type == PROTOTYPE_PROTOCOL && proto->cbSize == sizeof( *proto ))
{
diff --git a/plugins/CryptoPP/src/main.cpp b/plugins/CryptoPP/src/main.cpp index a5613db216..1efc2e7c4d 100644 --- a/plugins/CryptoPP/src/main.cpp +++ b/plugins/CryptoPP/src/main.cpp @@ -52,9 +52,7 @@ int Load() mir_getLP(&pluginInfoEx);
// register plugin module
- PROTOCOLDESCRIPTOR pd;
- memset(&pd,0,sizeof(pd));
- pd.cbSize = sizeof(pd);
+ PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
pd.szName = (char*)szModuleName;
pd.type = PROTOTYPE_ENCRYPTION;
CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd);
diff --git a/plugins/CyrTranslit/src/TransliterationProtocol.cpp b/plugins/CyrTranslit/src/TransliterationProtocol.cpp index 4fd3fb1b29..e261458934 100644 --- a/plugins/CyrTranslit/src/TransliterationProtocol.cpp +++ b/plugins/CyrTranslit/src/TransliterationProtocol.cpp @@ -31,11 +31,10 @@ char *TransliterationProtocol::MODULE_NAME = "ProtoCyrTranslitByIKR"; void TransliterationProtocol::initialize()
{
- PROTOCOLDESCRIPTOR desc;
- desc.cbSize = sizeof(desc);
- desc.szName = MODULE_NAME;
- desc.type = PROTOTYPE_TRANSLATION;
- CallService(MS_PROTO_REGISTERMODULE, 0, reinterpret_cast<LPARAM>(&desc));
+ PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
+ pd.szName = MODULE_NAME;
+ pd.type = PROTOTYPE_TRANSLATION;
+ CallService(MS_PROTO_REGISTERMODULE, 0, reinterpret_cast<LPARAM>(&pd));
CreateProtoServiceFunction(MODULE_NAME, PSS_MESSAGE, sendMessageA);
CreateProtoServiceFunction(MODULE_NAME, PSS_MESSAGE"W", sendMessageW);
diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp index 044e1f4ace..14a905a9b8 100644 --- a/plugins/FileAsMessage/src/main.cpp +++ b/plugins/FileAsMessage/src/main.cpp @@ -256,9 +256,7 @@ extern "C" __declspec(dllexport) int Load(void) CreateServiceFunction(SERVICE_NAME "/FESendFile", OnSendFile);
CreateServiceFunction(SERVICE_NAME "/FERecvFile", OnRecvFile);
- PROTOCOLDESCRIPTOR pd;
- memset(&pd, 0, sizeof( PROTOCOLDESCRIPTOR));
- pd.cbSize = sizeof(PROTOCOLDESCRIPTOR);
+ PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
pd.szName = SERVICE_NAME;
pd.type = PROTOTYPE_FILTER;
CallService(MS_PROTO_REGISTERMODULE, 0, ( LPARAM ) &pd);
diff --git a/plugins/MetaContacts/src/meta_main.cpp b/plugins/MetaContacts/src/meta_main.cpp index f307d800b6..9e04413983 100644 --- a/plugins/MetaContacts/src/meta_main.cpp +++ b/plugins/MetaContacts/src/meta_main.cpp @@ -150,9 +150,7 @@ BOOL IsUnicodeOS() */
extern "C" __declspec(dllexport) int Load(void)
{
- PROTOCOLDESCRIPTOR pd;
DBVARIANT dbv;
-
mir_getLP(&pluginInfo);
@@ -184,7 +182,6 @@ extern "C" __declspec(dllexport) int Load(void) DBWriteContactSettingDword(hContact, META_PROTO, "Default", DBGetContactSettingDword(hContact, META_PROTO, "SavedDefault", 0));
DBWriteContactSettingDword(hContact, META_PROTO, "SavedDefault", (DWORD)-1);
}
-
}
DBFreeVariant(&dbv);
}
@@ -222,17 +219,12 @@ extern "C" __declspec(dllexport) int Load(void) DBFreeVariant(&dbv);
}
- ZeroMemory(&pd,sizeof(pd));
- pd.cbSize=PROTOCOLDESCRIPTOR_V3_SIZE;//sizeof(pd);
-
- pd.szName=META_FILTER;
- pd.type=PROTOTYPE_FILTER;
+ PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE };
+ pd.szName = META_FILTER;
+ pd.type = PROTOTYPE_FILTER;
CallService(MS_PROTO_REGISTERMODULE,0,(LPARAM)&pd);
- ZeroMemory(&pd,sizeof(pd));
- pd.cbSize=PROTOCOLDESCRIPTOR_V3_SIZE;//sizeof(pd);
-
- pd.szName=META_PROTO;
+ pd.szName = META_PROTO;
pd.type = PROTOTYPE_PROTOCOL;
CallService(MS_PROTO_REGISTERMODULE,0,(LPARAM)&pd);
diff --git a/plugins/MirOTR/MirOTR/src/dllmain.cpp b/plugins/MirOTR/MirOTR/src/dllmain.cpp index 80833c9b2e..e9d04647d6 100644 --- a/plugins/MirOTR/MirOTR/src/dllmain.cpp +++ b/plugins/MirOTR/MirOTR/src/dllmain.cpp @@ -102,8 +102,7 @@ DLLFUNC int Load(void) /////////////
////// init plugin
- PROTOCOLDESCRIPTOR pd = {0};
- pd.cbSize = sizeof(pd);
+ PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
pd.szName = MODULENAME;
pd.type = PROTOTYPE_ENCRYPTION;
CallService(MS_PROTO_REGISTERMODULE,0,(LPARAM)&pd);
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp index cedffd4925..fbfe9ad9fa 100755 --- a/plugins/New_GPG/src/init.cpp +++ b/plugins/New_GPG/src/init.cpp @@ -167,10 +167,9 @@ static int OnModulesLoaded(WPARAM wParam,LPARAM lParam) g_hCLIcon = ExtraIcon_Register(szGPGModuleName, Translate("GPG encryption status"), "secured", (MIRANDAHOOK)onExtraImageListRebuilding, (MIRANDAHOOK)onExtraImageApplying);
- PROTOCOLDESCRIPTOR pd = {0};
- pd.cbSize=sizeof(PROTOCOLDESCRIPTOR);
- pd.szName=szGPGModuleName;
- pd.type=PROTOTYPE_ENCRYPTION;
+ PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
+ pd.szName = szGPGModuleName;
+ pd.type = PROTOTYPE_ENCRYPTION;
CallService(MS_PROTO_REGISTERMODULE,0,(LPARAM)&pd);
CreateProtoServiceFunction(szGPGModuleName, PSR_MESSAGE, (MIRANDASERVICE)RecvMsgSvc);
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp index de8015d342..d0ca0a56c1 100644 --- a/plugins/SecureIM/src/main.cpp +++ b/plugins/SecureIM/src/main.cpp @@ -126,9 +126,7 @@ extern "C" __declspec(dllexport) int __cdecl Load(void) load_rtfconv();
// register plugin module
- PROTOCOLDESCRIPTOR pd;
- memset(&pd,0,sizeof(pd));
- pd.cbSize = sizeof(pd);
+ PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
pd.szName = (char*)szModuleName;
pd.type = PROTOTYPE_ENCRYPTION;
CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd);
|