]> sourceware.org Git - newlib-cygwin.git/commitdiff
* path.cc (cwdstuff::set): Replace constant 2 with sizeof(WCHAR) where
authorCorinna Vinschen <corinna@vinschen.de>
Tue, 21 Sep 2010 16:41:17 +0000 (16:41 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Tue, 21 Sep 2010 16:41:17 +0000 (16:41 +0000)
appropriate.

winsup/cygwin/ChangeLog
winsup/cygwin/path.cc

index 13741ebbb0ee9e2e4450840bf9afaafebff8d900..da3de3f4f70ca6a1ce66ec400e90a24a62c8ceb6 100644 (file)
@@ -1,3 +1,8 @@
+2010-09-21  Corinna Vinschen  <corinna@vinschen.de>
+
+       * path.cc (cwdstuff::set): Replace constant 2 with sizeof(WCHAR) where
+       appropriate.
+
 2010-09-21  Corinna Vinschen  <corinna@vinschen.de>
 
        * mount.h (class fs_info): Add has_buggy_reopen flag and accessor
index 9eac51b63442cb66d3f5c8d15961c0fa5e971fb4..b468e9e37ac7dbd15dc1ddfc74798484e8d76b1c 100644 (file)
@@ -3483,8 +3483,9 @@ cwdstuff::set (path_conv *nat_cwd, const char *posix_cwd)
       PUNICODE_STRING pdir = &get_user_proc_parms ()->CurrentDirectoryName;
       RtlInitEmptyUnicodeString (&win32,
                                 (PWCHAR) crealloc_abort (win32.Buffer,
-                                                         pdir->Length + 2),
-                                pdir->Length + 2);
+                                                         pdir->Length
+                                                         + sizeof (WCHAR)),
+                                pdir->Length + sizeof (WCHAR));
       RtlCopyUnicodeString (&win32, pdir);
 
       PWSTR eoBuffer = win32.Buffer + (win32.Length / sizeof (WCHAR));
@@ -3520,8 +3521,9 @@ cwdstuff::set (path_conv *nat_cwd, const char *posix_cwd)
        }
       RtlInitEmptyUnicodeString (&win32,
                                 (PWCHAR) crealloc_abort (win32.Buffer,
-                                                         upath.Length + 2),
-                                upath.Length + 2);
+                                                         upath.Length
+                                                         + sizeof (WCHAR)),
+                                upath.Length + sizeof (WCHAR));
       RtlCopyUnicodeString (&win32, &upath);
       if (unc_path)
        win32.Buffer[0] = L'\\';
This page took 0.041013 seconds and 5 git commands to generate.