From: Armin Novak Date: Wed, 17 May 2017 14:17:16 +0000 (+0200) Subject: Use unicode constants for WCHAR X-Git-Tag: 2.0.0-rc0~28^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a309fcbec6fe2e8c554bea043ed95d1e6568726;p=platform%2Fupstream%2Ffreerdp.git Use unicode constants for WCHAR --- diff --git a/channels/drive/client/drive_file.c b/channels/drive/client/drive_file.c index a24ebcf..d75d7ac 100644 --- a/channels/drive/client/drive_file.c +++ b/channels/drive/client/drive_file.c @@ -59,24 +59,24 @@ static void drive_file_fix_path(WCHAR* path) for (i = 0; i < length; i++) { - if (path[i] == '\\') - path[i] = '/'; + if (path[i] == L'\\') + path[i] = L'/'; } #ifdef WIN32 - if ((length == 3) && (path[1] == ':') && (path[2] == '/')) + if ((length == 3) && (path[1] == L':') && (path[2] == L'/')) return; #else - if ((length == 1) && (path[0] == '/')) + if ((length == 1) && (path[0] == L'/')) return; #endif - if ((length > 0) && (path[length - 1] == '/')) - path[length - 1] = '\0'; + if ((length > 0) && (path[length - 1] == L'/')) + path[length - 1] = L'\0'; } static WCHAR* drive_file_combine_fullpath(const WCHAR* base_path, const WCHAR* path, @@ -126,8 +126,8 @@ static BOOL drive_file_remove_dir(const WCHAR* path) } CopyMemory(path_slash, path, base_path_length); - path_slash[base_path_length / 2] = '/'; - path_slash[base_path_length / 2 + 1] = '*'; + path_slash[base_path_length / 2] = L'/'; + path_slash[base_path_length / 2 + 1] = L'*'; DEBUG_WSTR("Search in %s", path_slash); dir = FindFirstFileW(path_slash, &findFileData); path_slash[base_path_length / 2 + 1] = 0; @@ -142,8 +142,8 @@ static BOOL drive_file_remove_dir(const WCHAR* path) { len = _wcslen(findFileData.cFileName); - if ((len == 1 && findFileData.cFileName[0] == '.') || (len == 2 && - findFileData.cFileName[0] == '.' && findFileData.cFileName[1] == '.')) + if ((len == 1 && findFileData.cFileName[0] == L'.') || (len == 2 && + findFileData.cFileName[0] == L'.' && findFileData.cFileName[1] == L'.')) { continue; } @@ -852,7 +852,3 @@ out_fail: Stream_Write_UINT8(output, 0); /* Padding */ return FALSE; } - -#ifdef _WIN32 -#pragma warning(pop) -#endif