0
0
mirror of https://github.com/vim/vim.git synced 2025-09-06 21:53:38 -04:00

patch 8.2.3947: unnecessary check for NULL pointer

Problem:    Unnecessary check for NULL pointer.
Solution:   Remove the check. (closes #9434)
This commit is contained in:
zeertzjq 2021-12-30 13:45:57 +00:00 committed by Bram Moolenaar
parent 1c67f3a977
commit f38aad85cf
2 changed files with 4 additions and 2 deletions

View 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);

View File

@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
3947,
/**/
3946,
/**/