diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-01-21 19:55:46 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-01-21 19:55:46 +0000 |
commit | 53d05354369c59a0c084bf0e4c72b1f25702746c (patch) | |
tree | b0e1a78a847ff79edd681ac111b6e28a26e1a1b8 /plugins/YARelay/src | |
parent | e80241cc3e2964c49abfd34ee1df8b9d900b1e8c (diff) |
YARelay: Minor cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@11888 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/YARelay/src')
-rw-r--r-- | plugins/YARelay/src/main.cpp | 11 | ||||
-rw-r--r-- | plugins/YARelay/src/options.cpp | 2 | ||||
-rw-r--r-- | plugins/YARelay/src/stdafx.h | 2 |
3 files changed, 8 insertions, 7 deletions
diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp index 668b5adf65..8a7974b621 100644 --- a/plugins/YARelay/src/main.cpp +++ b/plugins/YARelay/src/main.cpp @@ -54,7 +54,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) /**
* Protocols àcknowledgement
*/
-int ProtoAck(WPARAM wparam,LPARAM lparam)
+int ProtoAck(WPARAM,LPARAM lparam)
{
ACKDATA *pAck = (ACKDATA *)lparam;
if (pAck->type != ACKTYPE_MESSAGE || pAck->result != ACKRESULT_SUCCESS)
@@ -112,6 +112,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM hDBEvent) case ID_STATUS_DND: statMask = STATUS_DND ;break;
case ID_STATUS_FREECHAT: statMask = STATUS_FREECHAT ;break;
case ID_STATUS_INVISIBLE:statMask = STATUS_INVISIBLE;break;
+ default: return 0;
}
if ((iForwardOnStatus & statMask) == 0)
return 0;
@@ -238,10 +239,10 @@ extern "C" int __declspec(dllexport) Load() iForwardOnStatus = db_get_dw(NULL, "yaRelay", "ForwardOnStatus", STATUS_OFFLINE | STATUS_AWAY | STATUS_NA);
- DBVARIANT dbv;
- if (!db_get_ts(NULL, "yaRelay", "ForwardTemplate", &dbv)){
- _tcsncpy(tszForwardTemplate, dbv.ptszVal, SIZEOF(tszForwardTemplate));
- db_free(&dbv);
+ TCHAR *szForwardTemplate = db_get_tsa(NULL, "yaRelay", "ForwardTemplate");
+ if (szForwardTemplate){
+ _tcsncpy(tszForwardTemplate, szForwardTemplate, SIZEOF(tszForwardTemplate));
+ mir_free(szForwardTemplate);
}
else _tcsncpy(tszForwardTemplate, _T("%u: %m"), MAXTEMPLATESIZE-1);
diff --git a/plugins/YARelay/src/options.cpp b/plugins/YARelay/src/options.cpp index 5db185b7bd..6a6a42bd98 100644 --- a/plugins/YARelay/src/options.cpp +++ b/plugins/YARelay/src/options.cpp @@ -189,7 +189,7 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, /**
* Init options panel
*/
-int OptionsInit(WPARAM wParam, LPARAM lParam)
+int OptionsInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.hInstance = hInst;
diff --git a/plugins/YARelay/src/stdafx.h b/plugins/YARelay/src/stdafx.h index 5b1543f6c4..c2f40604ce 100644 --- a/plugins/YARelay/src/stdafx.h +++ b/plugins/YARelay/src/stdafx.h @@ -61,4 +61,4 @@ struct MESSAGE_PROC extern LIST<MESSAGE_PROC> arMessageProcs;
-int OptionsInit(WPARAM wParam, LPARAM lParam);
+int OptionsInit(WPARAM wParam, LPARAM);
|