summaryrefslogtreecommitdiff
path: root/plugins/NewXstatusNotify/src/main.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-03-20 21:49:23 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-03-20 21:49:23 +0000
commit3b95a5b3f6ff4541f5162acd20f3f54dd8a5339c (patch)
tree50134fd16c3b04ed2f5b7449482fca14277d8571 /plugins/NewXstatusNotify/src/main.cpp
parent3f403397d35d601078423e84d61ab0c1cce6203e (diff)
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@12457 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewXstatusNotify/src/main.cpp')
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index 6c20f4b169..46f123a3cd 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -197,23 +197,17 @@ TCHAR *GetStr(STATUSMSGINFO *n, const TCHAR *tmplt)
i++;
switch (tmplt[i]) {
case 'n':
- if (n->compare == COMPARE_DEL || _tcscmp(n->newstatusmsg, TranslateT("<no status message>")) == 0)
+ if (n->compare == COMPARE_DEL || mir_tstrcmp(n->newstatusmsg, TranslateT("<no status message>")) == 0)
mir_tstrncpy(tmp, TranslateT("<no status message>"), SIZEOF(tmp));
- else {
- TCHAR *_tmp = AddCR(n->newstatusmsg);
- mir_tstrncpy(tmp, _tmp, SIZEOF(tmp));
- mir_free(_tmp);
- }
+ else
+ mir_tstrncpy(tmp, ptrT(AddCR(n->newstatusmsg)), SIZEOF(tmp));
break;
case 'o':
if (n->oldstatusmsg == NULL || n->oldstatusmsg[0] == _T('\0') || _tcscmp(n->oldstatusmsg, TranslateT("<no status message>")) == 0)
mir_tstrncpy(tmp, TranslateT("<no status message>"), SIZEOF(tmp));
- else {
- TCHAR *_tmp = AddCR(n->oldstatusmsg);
- mir_tstrncpy(tmp, _tmp, SIZEOF(tmp));
- mir_free(_tmp);
- }
+ else
+ mir_tstrncpy(tmp, ptrT(AddCR(n->oldstatusmsg)), SIZEOF(tmp));
break;
case 'c':