0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 9.0.1311: Coverity warns for using a NULL pointer

Problem:    Coverity warns for using a NULL pointer.
Solution:   Use "empty_option" instead of NULL.
This commit is contained in:
Bram Moolenaar
2023-02-15 14:26:25 +00:00
parent fdbd14e892
commit 339e114d70
2 changed files with 4 additions and 0 deletions

View File

@@ -1990,6 +1990,8 @@ do_set_option_string(
// Set the new value.
*(char_u **)(varp) = newval;
if (newval == NULL)
*(char_u **)(varp) = empty_option;
#if defined(FEAT_EVAL)
if (!starting