1
0
forked from aniani/vim

patch 8.2.4771: Coverity warns for not checking return value

Problem:    Coverity warns for not checking return value.
Solution:   Check return value of rettv_dict_alloc().
This commit is contained in:
Bram Moolenaar
2022-04-17 13:17:40 +01:00
parent efbfa867a1
commit 066e0d9869
2 changed files with 4 additions and 1 deletions

View File

@@ -4549,7 +4549,8 @@ ch_expr_common(typval_T *argvars, typval_T *rettv, int eval)
dictitem_T *di; dictitem_T *di;
// return an empty dict by default // return an empty dict by default
rettv_dict_alloc(rettv); if (rettv_dict_alloc(rettv) == FAIL)
return;
if (argvars[1].v_type != VAR_DICT) if (argvars[1].v_type != VAR_DICT)
{ {

View File

@@ -746,6 +746,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 */
/**/
4771,
/**/ /**/
4770, 4770,
/**/ /**/