]> granicus.if.org Git - vim/commitdiff
patch 8.2.3947: unnecessary check for NULL pointer v8.2.3947
authorzeertzjq <zeertzjq@outlook.com>
Thu, 30 Dec 2021 13:45:57 +0000 (13:45 +0000)
committerBram Moolenaar <Bram@vim.org>
Thu, 30 Dec 2021 13:45:57 +0000 (13:45 +0000)
Problem:    Unnecessary check for NULL pointer.
Solution:   Remove the check. (closes #9434)

src/ex_docmd.c
src/version.c

index 12824a9dc9bd255536ce250270777cfb6c1d8980..a9adea3b66e5bd274b440df7f6390740b0e0ac71 100644 (file)
@@ -7411,9 +7411,9 @@ changedir_func(
 # endif
        new_dir = NameBuff;
     }
-    dir_differs = new_dir == NULL || pdir == NULL
+    dir_differs = pdir == NULL
        || pathcmp((char *)pdir, (char *)new_dir, -1) != 0;
-    if (new_dir == NULL || (dir_differs && vim_chdir(new_dir)))
+    if (dir_differs && vim_chdir(new_dir))
     {
        emsg(_(e_failed));
        vim_free(pdir);
index 25e40bf4c70a7ffd4fd260ce7c3333c06cdc77ce..56825f547b5653a980fb483da68a0cb6b6be9c77 100644 (file)
@@ -749,6 +749,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3947,
 /**/
     3946,
 /**/