diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-07-23 00:23:18 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-07-23 08:34:25 -0400 |
commit | 84b8612987320f722c33dff3a3f16930407c62ce (patch) | |
tree | 9c930548001b4db351b6a8a423bb4e59a095a1f5 /src/nvim/path.c | |
parent | 9fbbec76aaa8d45ba54bb136b750f2ccc440207f (diff) | |
download | rneovim-84b8612987320f722c33dff3a3f16930407c62ce.tar.gz rneovim-84b8612987320f722c33dff3a3f16930407c62ce.tar.bz2 rneovim-84b8612987320f722c33dff3a3f16930407c62ce.zip |
vim-patch:8.0.1512: warning for possibly using NULL pointer
Problem: Warning for possibly using NULL pointer. (Coverity)
Solution: Skip using the pointer if it's NULL.
https://github.com/vim/vim/commit/e4db7aedab65abadcc84c78e7a10ec7bb62f11cf
Diffstat (limited to 'src/nvim/path.c')
-rw-r--r-- | src/nvim/path.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c index d5c636ff08..0b90329686 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -52,7 +52,8 @@ /// @param s2 Second file name. /// @param checkname When both files don't exist, only compare their names. /// @return Enum of type FileComparison. @see FileComparison. -FileComparison path_full_compare(char_u *s1, char_u *s2, int checkname) +FileComparison path_full_compare(char_u *const s1, char_u *const s2, + const bool checkname) { assert(s1 && s2); char_u exp1[MAXPATHL]; |