Patch 8.2.3947
Problem:    Unnecessary check for NULL pointer.
Solution:   Remove the check. (closes #9434)
Files:      src/ex_docmd.c


*** ../vim-8.2.3946/src/ex_docmd.c      2021-12-29 19:41:42.446404689 +0000
--- src/ex_docmd.c      2021-12-30 13:44:20.278924993 +0000
***************
*** 7411,7419 ****
  # endif
        new_dir = NameBuff;
      }
!     dir_differs = new_dir == NULL || pdir == NULL
        || pathcmp((char *)pdir, (char *)new_dir, -1) != 0;
!     if (new_dir == NULL || (dir_differs && vim_chdir(new_dir)))
      {
        emsg(_(e_failed));
        vim_free(pdir);
--- 7411,7419 ----
  # endif
        new_dir = NameBuff;
      }
!     dir_differs = pdir == NULL
        || pathcmp((char *)pdir, (char *)new_dir, -1) != 0;
!     if (dir_differs && vim_chdir(new_dir))
      {
        emsg(_(e_failed));
        vim_free(pdir);
*** ../vim-8.2.3946/src/version.c       2021-12-30 13:32:05.687843894 +0000
--- src/version.c       2021-12-30 13:45:38.998864967 +0000
***************
*** 751,752 ****
--- 751,754 ----
  {   /* Add new patch number below this line */
+ /**/
+     3947,
  /**/

-- 
Although the scythe isn't pre-eminent among the weapons of war, anyone who
has been on the wrong end of, say, a peasants' revolt will know that in
skilled hands it is fearsome.
                                        -- (Terry Pratchett, Mort)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20211230134638.D48CD1C0A5B%40moolenaar.net.

Raspunde prin e-mail lui