comparison src/ex_docmd.c @ 26837:6aae8f25790a v8.2.3947

patch 8.2.3947: unnecessary check for NULL pointer Commit: https://github.com/vim/vim/commit/f38aad85cf8e4e930c96cb843bc136949c8dbd29 Author: zeertzjq <zeertzjq@outlook.com> Date: Thu Dec 30 13:45:57 2021 +0000 patch 8.2.3947: unnecessary check for NULL pointer Problem: Unnecessary check for NULL pointer. Solution: Remove the check. (closes https://github.com/vim/vim/issues/9434)
author Bram Moolenaar <Bram@vim.org>
date Thu, 30 Dec 2021 15:00:04 +0100
parents 3c1dcb63f579
children 2aeea8611342
comparison
equal deleted inserted replaced
26836:bf3405e535fb 26837:6aae8f25790a
7409 # else 7409 # else
7410 expand_env((char_u *)"$HOME", NameBuff, MAXPATHL); 7410 expand_env((char_u *)"$HOME", NameBuff, MAXPATHL);
7411 # endif 7411 # endif
7412 new_dir = NameBuff; 7412 new_dir = NameBuff;
7413 } 7413 }
7414 dir_differs = new_dir == NULL || pdir == NULL 7414 dir_differs = pdir == NULL
7415 || pathcmp((char *)pdir, (char *)new_dir, -1) != 0; 7415 || pathcmp((char *)pdir, (char *)new_dir, -1) != 0;
7416 if (new_dir == NULL || (dir_differs && vim_chdir(new_dir))) 7416 if (dir_differs && vim_chdir(new_dir))
7417 { 7417 {
7418 emsg(_(e_failed)); 7418 emsg(_(e_failed));
7419 vim_free(pdir); 7419 vim_free(pdir);
7420 } 7420 }
7421 else 7421 else