ntdll: Avoid hardcoding the Unicode string literal lengths.
authorFrancois Gouget <fgouget@free.fr>
Fri, 16 Dec 2011 12:07:20 +0000 (13:07 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 16 Dec 2011 16:40:39 +0000 (17:40 +0100)
dlls/ntdll/path.c

index 23f2bbd..d22434c 100644 (file)
@@ -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;