aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/undo.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-06-16 20:27:25 -0400
committerJustin M. Keyes <justinkz@gmail.com>2014-06-16 20:27:25 -0400
commitd199d18159c624844c9c8052d1a98b91084fb803 (patch)
tree827dd9c4f8f1f6ef73ff1f20a609d08e36640986 /src/nvim/undo.c
parent8bbeb4b480a72d0099a18c4d8200313600045231 (diff)
parente85598e5a91c714c10034b6b3986a666065d1078 (diff)
downloadrneovim-d199d18159c624844c9c8052d1a98b91084fb803.tar.gz
rneovim-d199d18159c624844c9c8052d1a98b91084fb803.tar.bz2
rneovim-d199d18159c624844c9c8052d1a98b91084fb803.zip
Merge #787 'removal of redundant OOM error handling'
Diffstat (limited to 'src/nvim/undo.c')
-rw-r--r--src/nvim/undo.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c
index b7a3601d0f..37fa150aee 100644
--- a/src/nvim/undo.c
+++ b/src/nvim/undo.c
@@ -2725,8 +2725,6 @@ void u_eval_tree(u_header_T *first_uhp, list_T *list)
while (uhp != NULL) {
dict = dict_alloc();
- if (dict == NULL)
- return;
dict_add_nr_str(dict, "seq", uhp->uh_seq, NULL);
dict_add_nr_str(dict, "time", (long)uhp->uh_time, NULL);
if (uhp == curbuf->b_u_newhead)
@@ -2737,13 +2735,11 @@ void u_eval_tree(u_header_T *first_uhp, list_T *list)
dict_add_nr_str(dict, "save", uhp->uh_save_nr, NULL);
if (uhp->uh_alt_next.ptr != NULL) {
- list_T *alt_list = list_alloc();
+ list_T *alt_list = list_alloc();
- if (alt_list != NULL) {
- /* Recursive call to add alternate undo tree. */
- u_eval_tree(uhp->uh_alt_next.ptr, alt_list);
- dict_add_list(dict, "alt", alt_list);
- }
+ /* Recursive call to add alternate undo tree. */
+ u_eval_tree(uhp->uh_alt_next.ptr, alt_list);
+ dict_add_list(dict, "alt", alt_list);
}
list_append_dict(list, dict);