forked from aniani/vim
patch 8.2.0394: Coverity complains about using NULL pointer
Problem: Coverity complains about using NULL pointer. Solution: Use empty string when option value is NULL.
This commit is contained in:
@@ -500,7 +500,7 @@ set_string_option(
|
||||
if (is_hidden_option(opt_idx)) // don't set hidden option
|
||||
return NULL;
|
||||
|
||||
s = vim_strsave(value);
|
||||
s = vim_strsave(value == NULL ? (char_u *)"" : value);
|
||||
if (s != NULL)
|
||||
{
|
||||
varp = (char_u **)get_option_varp_scope(opt_idx,
|
||||
|
||||
@@ -738,6 +738,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
394,
|
||||
/**/
|
||||
393,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user