1
0
forked from aniani/vim

patch 8.2.0166: Coverity warning for using uninitialized variable

Problem:    Coverity warning for using uninitialized variable.
Solution:   Check for failure.
This commit is contained in:
Bram Moolenaar 2020-01-28 22:39:19 +01:00
parent 5b18c248d3
commit 07da94b0f0
2 changed files with 8 additions and 1 deletions

View File

@ -742,6 +742,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 */
/**/
166,
/**/ /**/
165, 165,
/**/ /**/

View File

@ -570,7 +570,12 @@ call_def_function(
if (ga_grow(&ectx.ec_stack, 1) == FAIL) if (ga_grow(&ectx.ec_stack, 1) == FAIL)
goto failed; goto failed;
get_env_tv(&name, &optval, TRUE); if (get_env_tv(&name, &optval, TRUE) == FAIL)
{
semsg(_("E1060: Invalid environment variable name: %s"),
iptr->isn_arg.string);
goto failed;
}
*STACK_TV_BOT(0) = optval; *STACK_TV_BOT(0) = optval;
++ectx.ec_stack.ga_len; ++ectx.ec_stack.ga_len;
} }