forked from aniani/vim
patch 9.0.1216: Coverity warns for ignoring return value
Problem: Coverity warns for ignoring return value. Solution: Break out of loop if function fails.
This commit is contained in:
13
src/mbyte.c
13
src/mbyte.c
@@ -5756,11 +5756,14 @@ f_getcellwidths(typval_T *argvars UNUSED, typval_T *rettv)
|
|||||||
list_T *entry = list_alloc();
|
list_T *entry = list_alloc();
|
||||||
if (entry == NULL)
|
if (entry == NULL)
|
||||||
break;
|
break;
|
||||||
list_append_number(entry, (varnumber_T)cw_table[i].first);
|
if (list_append_number(entry, (varnumber_T)cw_table[i].first) == FAIL
|
||||||
list_append_number(entry, (varnumber_T)cw_table[i].last);
|
|| list_append_number(entry, (varnumber_T)cw_table[i].last) == FAIL
|
||||||
list_append_number(entry, (varnumber_T)cw_table[i].width);
|
|| list_append_number(entry, (varnumber_T)cw_table[i].width) == FAIL
|
||||||
|
|| list_append_list(rettv->vval.v_list, entry) == FAIL)
|
||||||
list_append_list(rettv->vval.v_list, entry);
|
{
|
||||||
|
list_free(entry);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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 */
|
||||||
|
/**/
|
||||||
|
1216,
|
||||||
/**/
|
/**/
|
||||||
1215,
|
1215,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user