From 70f3303093a5e720436470642b3916f08f2aee9d Mon Sep 17 00:00:00 2001
From: George Hazan <george.hazan@gmail.com>
Date: Wed, 27 Apr 2016 15:42:04 +0000
Subject: we don't need these constructions anymore

git-svn-id: http://svn.miranda-ng.org/main/trunk@16779 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
---
 plugins/LotusNotify/src/LotusNotify.cpp | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp
index 8f2316ad04..ed2a7b5345 100644
--- a/plugins/LotusNotify/src/LotusNotify.cpp
+++ b/plugins/LotusNotify/src/LotusNotify.cpp
@@ -1575,22 +1575,10 @@ void checkEnvPath(TCHAR *path)
 	_tcslwr(cur);
 	TCHAR *found = _tcsstr(cur, path);
 	size_t len = mir_tstrlen(path);
-	if (found != NULL && (found[len] == ';' || found[len] == 0 || (found[len] == '\\' && (found[len + 1] == ';' || found[len + 1] == 0)))) {
+	if (found != NULL && (found[len] == ';' || found[len] == 0 || (found[len] == '\\' && (found[len + 1] == ';' || found[len + 1] == 0))))
 		return;
-	}
-
-	len = mir_tstrlen(_T("PATH=")) + mir_tstrlen(cur) + 1 /* ; */ + mir_tstrlen(path) + 1 /* ; */ + 1 /* ending null */;
-	TCHAR *nowy = new TCHAR[len];
-	_tcsncpy_s(nowy, len, _T("PATH="), _TRUNCATE);
-	_tcscat_s(nowy, len, cur);
-	if (cur[mir_tstrlen(cur) - 1] != ';')
-		_tcscat_s(nowy, len, _T(";"));
-	_tcscat_s(nowy, len, path);
-	_tcscat_s(nowy, len, _T(";"));
-
-	_tputenv(nowy);
 
-	delete[] nowy;
+	_tputenv(CMString(FORMAT, _T("PATH=%s;%s;"), cur, path));
 }
 
 //GetStatus
-- 
cgit v1.2.3