summaryrefslogtreecommitdiff
path: root/plugins/KeyboardNotify
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-06-18 14:12:13 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-06-18 14:12:13 +0000
commit81337e86426dd4a79836554342bdc2e7e6195769 (patch)
tree4854edef6130b994f3611eb1a035b5de8b37f5cc /plugins/KeyboardNotify
parent4f14e4f86d5855d75c0941f9b8495e5a2e522087 (diff)
massive extinction of stupid service name's buffers
git-svn-id: http://svn.miranda-ng.org/main/trunk@5010 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/KeyboardNotify')
-rw-r--r--plugins/KeyboardNotify/src/main.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp
index b44e1de20d..6de02d77ee 100644
--- a/plugins/KeyboardNotify/src/main.cpp
+++ b/plugins/KeyboardNotify/src/main.cpp
@@ -783,15 +783,11 @@ void GetWindowsVersion(void)
void updateXstatusProto(PROTOCOL_INFO *protoInfo)
{
- unsigned int i;
- char szServiceName[MAXMODULELABELLENGTH];
- CUSTOM_STATUS xstatus={0};
-
- mir_snprintf(szServiceName, sizeof(szServiceName), "%s%s", protoInfo->szProto, PS_GETCUSTOMSTATUSEX);
- if (!ServiceExists(szServiceName)) return;
+ if (!ProtoServiceExists(protoInfo->szProto, PS_GETCUSTOMSTATUSEX))
+ return;
// Retrieve xstatus.count
- xstatus.cbSize = sizeof(CUSTOM_STATUS);
+ CUSTOM_STATUS xstatus = { sizeof(xstatus) };
xstatus.flags = CSSF_STATUSES_COUNT;
xstatus.wParam = &(protoInfo->xstatus.count);
CallProtoService(protoInfo->szProto, PS_GETCUSTOMSTATUSEX, 0, (LPARAM)&xstatus);
@@ -802,9 +798,8 @@ void updateXstatusProto(PROTOCOL_INFO *protoInfo)
if (!protoInfo->xstatus.enabled)
protoInfo->xstatus.count = 0;
else
- for(i=0; i < protoInfo->xstatus.count; i++)
+ for(unsigned i=0; i < protoInfo->xstatus.count; i++)
protoInfo->xstatus.enabled[i] = FALSE;
-
}