diff options
Diffstat (limited to 'src/nvim/undo.c')
-rw-r--r-- | src/nvim/undo.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c index 99ea5d238c..fa778b6803 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -2931,8 +2931,6 @@ static void u_freebranch(buf_T *buf, u_header_T *uhp, u_header_T **uhpp) /// @param uhpp if not NULL reset when freeing this header static void u_freeentries(buf_T *buf, u_header_T *uhp, u_header_T **uhpp) { - u_entry_T *uep, *nuep; - // Check for pointers to the header that become invalid now. if (buf->b_u_curhead == uhp) { buf->b_u_curhead = NULL; @@ -2944,7 +2942,8 @@ static void u_freeentries(buf_T *buf, u_header_T *uhp, u_header_T **uhpp) *uhpp = NULL; } - for (uep = uhp->uh_entry; uep != NULL; uep = nuep) { + u_entry_T *nuep; + for (u_entry_T *uep = uhp->uh_entry; uep != NULL; uep = nuep) { nuep = uep->ue_next; u_freeentry(uep, uep->ue_size); } |