]> granicus.if.org Git - vim/commitdiff
updated for version 7.4a.040 v7.4a.040
authorBram Moolenaar <Bram@vim.org>
Wed, 24 Jul 2013 11:49:22 +0000 (13:49 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 24 Jul 2013 11:49:22 +0000 (13:49 +0200)
Problem:    Win32: using uninitialized variable.
Solution:   (Yukihiro Nakadaira)

src/os_win32.c
src/version.c

index db3c794dabfbb3a8b039bd94a4cd4129d9f56f72..48cc4c5dc01c5dd6489bb7d7901359a2aa6a6197 100644 (file)
@@ -2717,21 +2717,19 @@ mch_getperm(char_u *name)
 
 
 /*
- * set file permission for `name' to `perm'
+ * Set file permission for "name" to "perm".
  *
- * return FAIL for failure, OK otherwise
+ * Return FAIL for failure, OK otherwise.
  */
     int
-mch_setperm(
-    char_u  *name,
-    long    perm)
+mch_setperm(char_u *name, long perm)
 {
-    long       n;
+    long       n = -1;
+
 #ifdef FEAT_MBYTE
-    WCHAR *p;
     if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
     {
-       p = enc_to_utf16(name, NULL);
+       WCHAR *p = enc_to_utf16(name, NULL);
 
        if (p != NULL)
        {
@@ -2742,7 +2740,7 @@ mch_setperm(
            /* Retry with non-wide function (for Windows 98). */
        }
     }
-    if (p == NULL)
+    if (n == -1)
 #endif
        n = _chmod(name, perm);
     if (n == -1)
index f1d5214a1fe9f80ec87673a2745d857ccd5186ff..f35c8b904f230bd77d3b658fab615ff903349899 100644 (file)
@@ -727,6 +727,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    40,
 /**/
     39,
 /**/