aboutsummaryrefslogtreecommitdiff
path: root/src/eval.c
diff options
context:
space:
mode:
authoroni-link <knil.ino@gmail.com>2014-04-24 15:41:45 +0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-28 07:46:24 -0300
commit8d5a546d3fdd25c8221e0e6f78c6d7ee1ebda433 (patch)
tree6da8d24fcc537c8ab5a0eb6690711fa181959f8d /src/eval.c
parent9da32a1f78fe075663466ac1349cb1495420591f (diff)
downloadrneovim-8d5a546d3fdd25c8221e0e6f78c6d7ee1ebda433.tar.gz
rneovim-8d5a546d3fdd25c8221e0e6f78c6d7ee1ebda433.tar.bz2
rneovim-8d5a546d3fdd25c8221e0e6f78c6d7ee1ebda433.zip
Call to list_append_dict cannot fail.
Clean up the use of list_append_dict and remove error checks.
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/eval.c b/src/eval.c
index a2c752789f..b7b3bd45ee 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -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;
}
/*