summaryrefslogtreecommitdiff
path: root/plugins/ExternalAPI
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-09-30 17:38:07 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-09-30 17:38:07 +0000
commitd22ed83105dc6342407ea29e0447ef6d3a1106ce (patch)
tree582cfbf99cd2a251918e3641b00d356608c108ec /plugins/ExternalAPI
parent502e5d5567382327aed1a5fb6166d91241acf3c0 (diff)
code optimization
git-svn-id: http://svn.miranda-ng.org/main/trunk@15481 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ExternalAPI')
-rw-r--r--plugins/ExternalAPI/m_statusplugins.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/plugins/ExternalAPI/m_statusplugins.h b/plugins/ExternalAPI/m_statusplugins.h
index a242805c97..63e39e80b3 100644
--- a/plugins/ExternalAPI/m_statusplugins.h
+++ b/plugins/ExternalAPI/m_statusplugins.h
@@ -135,19 +135,12 @@ typedef struct {
__inline static int announce_status_change(char *szProto, int newstatus, TCHAR *szMsg) {
- PROTOCOLSETTINGEX ps;
-
- ZeroMemory(&ps, sizeof(PROTOCOLSETTINGEX));
+ PROTOCOLSETTINGEX ps = { 0 };
ps.cbSize = sizeof(PROTOCOLSETTINGEX);
- if (szProto != NULL) {
- ps.lastStatus = CallProtoService(szProto, PS_GETSTATUS, 0, 0);
- } else {
- ps.lastStatus = CallService(MS_CLIST_GETSTATUSMODE, 0, 0);
- }
+ ps.lastStatus = szProto != NULL ? CallProtoService(szProto, PS_GETSTATUS, 0, 0) : CallService(MS_CLIST_GETSTATUSMODE, 0, 0);
ps.status = newstatus;
ps.szMsg = szMsg;
ps.szName = szProto;
-
return CallService(MS_KS_ANNOUNCESTATUSCHANGE, 0, (LPARAM)&ps);
}