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.
e4db7aedab
This commit is contained in:
Jan Edmund Lazo
2018-07-23 00:23:18 -04:00
parent 9fbbec76aa
commit 84b8612987
7 changed files with 45 additions and 32 deletions

View File

@@ -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];