mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 9.0.0628: Coverity warns for not checking return value
Problem: Coverity warns for not checking return value. Solution: Check the return value and simplify the code.
This commit is contained in:
parent
6586a01514
commit
d0121c63cf
@ -699,6 +699,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 */
|
||||||
|
/**/
|
||||||
|
628,
|
||||||
/**/
|
/**/
|
||||||
627,
|
627,
|
||||||
/**/
|
/**/
|
||||||
|
@ -485,18 +485,13 @@ typval2type_int(typval_T *tv, int copyID, garray_T *type_gap, int flags)
|
|||||||
{
|
{
|
||||||
type->tt_argcount -= tv->vval.v_partial->pt_argc;
|
type->tt_argcount -= tv->vval.v_partial->pt_argc;
|
||||||
type->tt_min_argcount -= tv->vval.v_partial->pt_argc;
|
type->tt_min_argcount -= tv->vval.v_partial->pt_argc;
|
||||||
if (type->tt_argcount <= 0)
|
if (type->tt_argcount > 0
|
||||||
type->tt_args = NULL;
|
&& func_type_add_arg_types(type,
|
||||||
else
|
type->tt_argcount, type_gap) == OK)
|
||||||
{
|
for (int i = 0; i < type->tt_argcount; ++i)
|
||||||
int i;
|
type->tt_args[i] =
|
||||||
|
ufunc->uf_func_type->tt_args[
|
||||||
func_type_add_arg_types(type, type->tt_argcount,
|
|
||||||
type_gap);
|
|
||||||
for (i = 0; i < type->tt_argcount; ++i)
|
|
||||||
type->tt_args[i] = ufunc->uf_func_type->tt_args[
|
|
||||||
i + tv->vval.v_partial->pt_argc];
|
i + tv->vval.v_partial->pt_argc];
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user