1
0
forked from aniani/vim

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. // Set the new value.
*(char_u **)(varp) = newval; *(char_u **)(varp) = newval;
if (newval == NULL)
*(char_u **)(varp) = empty_option;
#if defined(FEAT_EVAL) #if defined(FEAT_EVAL)
if (!starting if (!starting

View File

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