=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: kernel32/tests: Constify some character strings.

Alexandre Julliard julliard at winehq.org
Thu Dec 26 12:23:32 CST 2013


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

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Tue Dec 24 09:25:37 2013 +0100

kernel32/tests: Constify some character strings.

---

 dlls/kernel32/tests/profile.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c
index 9b83e85..c6e0b61 100644
--- a/dlls/kernel32/tests/profile.c
+++ b/dlls/kernel32/tests/profile.c
@@ -92,12 +92,12 @@ static void test_profile_int(void)
 
 static void test_profile_string(void)
 {
-    static WCHAR emptyW[] = { 0 };
-    static WCHAR keyW[] = { 'k','e','y',0 };
-    static WCHAR sW[] = { 's',0 };
-    static WCHAR TESTFILE2W[] = {'.','\\','t','e','s','t','w','i','n','e','2','.','i','n','i',0};
-    static WCHAR valsectionW[] = {'v','a','l','_','e','_','s','e','c','t','i','o','n',0 };
-    static WCHAR valnokeyW[] = {'v','a','l','_','n','o','_','k','e','y',0};
+    static const WCHAR emptyW[] = { 0 };
+    static const WCHAR keyW[] = { 'k','e','y',0 };
+    static const WCHAR sW[] = { 's',0 };
+    static const WCHAR TESTFILE2W[] = {'.','\\','t','e','s','t','w','i','n','e','2','.','i','n','i',0};
+    static const WCHAR valsectionW[] = {'v','a','l','_','e','_','s','e','c','t','i','o','n',0 };
+    static const WCHAR valnokeyW[] = {'v','a','l','_','n','o','_','k','e','y',0};
     HANDLE h;
     int ret;
     DWORD count;
@@ -441,9 +441,9 @@ static void test_profile_existing(void)
 
 static void test_profile_delete_on_close(void)
 {
-    static CHAR testfile[] = ".\\testwine5.ini";
     HANDLE h;
     DWORD size, res;
+    static const CHAR testfile[] = ".\\testwine5.ini";
     static const char contents[] = "[" SECTION "]\n" KEY "=123\n";
 
     h = CreateFileA(testfile, GENERIC_WRITE, FILE_SHARE_READ, NULL,
@@ -464,7 +464,7 @@ static void test_profile_delete_on_close(void)
 
 static void test_profile_refresh(void)
 {
-    static CHAR testfile[] = ".\\winetest4.ini";
+    static const CHAR testfile[] = ".\\winetest4.ini";
     HANDLE h;
     DWORD size, res;
     static const char contents1[] = "[" SECTION "]\n" KEY "=123\n";




More information about the wine-cvs mailing list