From 3b95a5b3f6ff4541f5162acd20f3f54dd8a5339c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 20 Mar 2015 21:49:23 +0000 Subject: code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@12457 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewXstatusNotify/src/main.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'plugins/NewXstatusNotify/src/main.cpp') 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("")) == 0) + if (n->compare == COMPARE_DEL || mir_tstrcmp(n->newstatusmsg, TranslateT("")) == 0) mir_tstrncpy(tmp, TranslateT(""), 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("")) == 0) mir_tstrncpy(tmp, TranslateT(""), 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': -- cgit v1.2.3