Call to list_append_dict cannot fail.

Clean up the use of list_append_dict and remove error checks.
This commit is contained in:
oni-link
2014-04-24 15:41:45 +02:00
committed by Thiago de Arruda
parent 9da32a1f78
commit 8d5a546d3f
4 changed files with 5 additions and 14 deletions

View File

@@ -5535,20 +5535,16 @@ int list_append_tv(list_T *l, typval_T *tv)
/*
* Add a dictionary to a list. Used by getqflist().
* Return FAIL when out of memory.
*/
int list_append_dict(list_T *list, dict_T *dict)
void list_append_dict(list_T *list, dict_T *dict)
{
listitem_T *li = listitem_alloc();
if (li == NULL)
return FAIL;
li->li_tv.v_type = VAR_DICT;
li->li_tv.v_lock = 0;
li->li_tv.vval.v_dict = dict;
list_append(list, li);
++dict->dv_refcount;
return OK;
}
/*