From 41f218316dce6b1bfcfb0f2754379fa74c5138ed Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 19 Oct 2013 14:35:34 +0000 Subject: warning fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@6534 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/ExternalAPI/m_folders.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'plugins/ExternalAPI') diff --git a/plugins/ExternalAPI/m_folders.h b/plugins/ExternalAPI/m_folders.h index 9e0d1f7546..e2fc98626a 100644 --- a/plugins/ExternalAPI/m_folders.h +++ b/plugins/ExternalAPI/m_folders.h @@ -208,10 +208,8 @@ __inline static INT_PTR FoldersGetCustomPathEx(HANDLE hFolderEntry, char *path, mir_snprintf(path, size, "%s", buffer); } - if (strlen(path) > 0) + if (path[0] != '\0') strncat(path, "\\", size); - else - path[0] = '\0'; if (fileName) strncat(path, fileName, size); @@ -233,10 +231,8 @@ __inline static INT_PTR FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pa mir_sntprintf(pathW, size, _T("%s"), buffer); } - if (wcslen(pathW) > 0) - wcsncat(pathW, L"\\",size); - else - pathW[0] = L'\0'; + if (pathW[0] != '\0') + wcsncat(pathW, L"\\", size); if (fileNameW) wcsncat(pathW, fileNameW, size); -- cgit v1.2.3