Francois Gouget : ntdll: Avoid hardcoding the Unicode string literal lengths.

Alexandre Julliard julliard at winehq.org
Fri Dec 16 11:22:55 CST 2011


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

Author: Francois Gouget <fgouget at free.fr>
Date:   Fri Dec 16 13:07:20 2011 +0100

ntdll: Avoid hardcoding the Unicode string literal lengths.

---

 dlls/ntdll/path.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/dlls/ntdll/path.c b/dlls/ntdll/path.c
index 23f2bbd..d22434c 100644
--- a/dlls/ntdll/path.c
+++ b/dlls/ntdll/path.c
@@ -269,12 +269,12 @@ DOS_PATHNAME_TYPE WINAPI RtlDetermineDosPathNameType_U( PCWSTR path )
 ULONG WINAPI RtlIsDosDeviceName_U( PCWSTR dos_name )
 {
     static const WCHAR consoleW[] = {'\\','\\','.','\\','C','O','N',0};
-    static const WCHAR auxW[3] = {'A','U','X'};
-    static const WCHAR comW[3] = {'C','O','M'};
-    static const WCHAR conW[3] = {'C','O','N'};
-    static const WCHAR lptW[3] = {'L','P','T'};
-    static const WCHAR nulW[3] = {'N','U','L'};
-    static const WCHAR prnW[3] = {'P','R','N'};
+    static const WCHAR auxW[] = {'A','U','X'};
+    static const WCHAR comW[] = {'C','O','M'};
+    static const WCHAR conW[] = {'C','O','N'};
+    static const WCHAR lptW[] = {'L','P','T'};
+    static const WCHAR nulW[] = {'N','U','L'};
+    static const WCHAR prnW[] = {'P','R','N'};
 
     const WCHAR *start, *end, *p;
 
@@ -343,7 +343,7 @@ BOOLEAN  WINAPI RtlDosPathNameToNtPathName_U(PCWSTR dos_path,
                                              PWSTR* file_part,
                                              CURDIR* cd)
 {
-    static const WCHAR LongFileNamePfxW[4] = {'\\','\\','?','\\'};
+    static const WCHAR LongFileNamePfxW[] = {'\\','\\','?','\\'};
     ULONG sz, offset;
     WCHAR local[MAX_PATH];
     LPWSTR ptr;




More information about the wine-cvs mailing list