diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-19 20:20:22 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-19 20:20:22 +0000 |
commit | d58766cc83b162eaca5cbdf4e9e204305968b435 (patch) | |
tree | 9bc0010b2266670346c48a937a05755f7e0a4a97 /plugins/StatusPlugins/KeepStatus/keepstatus.cpp | |
parent | 9cefaaec02616cbda530ef58afb9be013499c1d6 (diff) |
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@1053 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins/KeepStatus/keepstatus.cpp')
-rw-r--r-- | plugins/StatusPlugins/KeepStatus/keepstatus.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp index b451325c19..cc4903a511 100644 --- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp +++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp @@ -223,7 +223,7 @@ static PROTOCOLSETTINGEX** GetCurrentProtoSettingsCopy() static void FreeProtoSettings(PROTOCOLSETTINGEX** ps)
{
- for(int i=0;i<connectionSettings.getCount();i++) {
+ for(int i=0; i < connectionSettings.getCount(); i++) {
if (ps[i]->szMsg != NULL)
free(ps[i]->szMsg);
free(ps[i]);
@@ -250,7 +250,7 @@ static int AssignStatus(TConnectionSettings* cs, int status, int lastStatus, TCH log_infoA("KeepStatus: assigning status %d to %s", cs->status, cs->szName);
- if ( szMsg != NULL && _tcscmp(szMsg, cs->szMsg)) {
+ if ( szMsg != NULL && lstrcmp(szMsg, cs->szMsg)) {
if ( cs->szMsg != NULL )
free(cs->szMsg);
@@ -277,10 +277,8 @@ static int GetStatus(const TConnectionSettings& cs) static int SetCurrentStatus()
{
int ret, i, realStatus;
- PROTOCOLSETTINGEX **ps;
-
- ps = GetCurrentProtoSettingsCopy();
- for (i=0;i<connectionSettings.getCount();i++) {
+ PROTOCOLSETTINGEX **ps = GetCurrentProtoSettingsCopy();
+ for (i=0; i < connectionSettings.getCount(); i++) {
realStatus = CallProtoService(ps[i]->szName, PS_GETSTATUS, 0, 0);
if ( (ps[i]->status == ID_STATUS_DISABLED) || (ps[i]->status == realStatus) || (DBGetContactSettingByte(NULL, ps[i]->szName, SETTING_PROTORETRY, 0))) { // ignore this proto by removing it's name (not so nice)
ps[i]->szName = "";
|