Alexandre Julliard : kernel32/tests: Use a pointer instead of an array to make gcc happy.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Oct 28 02:24:36 CDT 2014


Module: wine
Branch: master
Commit: 3e1c4908ef5d8ee12e349f760a70cab9758539c5
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3e1c4908ef5d8ee12e349f760a70cab9758539c5

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Oct 28 15:59:55 2014 +0900

kernel32/tests: Use a pointer instead of an array to make gcc happy.

---

 dlls/kernel32/tests/actctx.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c
index ae9674a..1f5683f 100644
--- a/dlls/kernel32/tests/actctx.c
+++ b/dlls/kernel32/tests/actctx.c
@@ -2055,7 +2055,6 @@ static void run_child_process(void)
 static void init_paths(void)
 {
     LPWSTR ptr;
-    WCHAR last;
 
     static const WCHAR dot_manifest[] = {'.','M','a','n','i','f','e','s','t',0};
     static const WCHAR backslash[] = {'\\',0};
@@ -2067,8 +2066,8 @@ static void init_paths(void)
     ptr[1] = 0;
 
     GetCurrentDirectoryW(MAX_PATH, work_dir);
-    last = work_dir[lstrlenW(work_dir) - 1];
-    if (last != '\\' && last != '/')
+    ptr = work_dir + lstrlenW( work_dir ) - 1;
+    if (*ptr != '\\' && *ptr != '/')
         lstrcatW(work_dir, backslash);
     lstrcpyW(work_dir_subdir, work_dir);
     lstrcatW(work_dir_subdir, subdir);




More information about the wine-cvs mailing list