To: vim_dev@googlegroups.com Subject: Patch 8.2.3947 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///