summaryrefslogtreecommitdiff
path: root/src/drawscreen.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-06 22:13:01 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-06 22:13:01 +0200
commit00d253e2b2f435a5386582c3f857008e7ac355c2 (patch)
tree71bbea4e4c6efa593a85266e445d82377a65f454 /src/drawscreen.c
parentee4e0c1e9a81cb5d96e0060203a9033c2f28588e (diff)
downloadvim-git-00d253e2b2f435a5386582c3f857008e7ac355c2.tar.gz
patch 8.2.0523: loops are repeatedv8.2.0523
Problem: Loops are repeated. Solution: Use FOR_ALL_ macros. (Yegappan Lakshmanan, closes #5882)
Diffstat (limited to 'src/drawscreen.c')
-rw-r--r--src/drawscreen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drawscreen.c b/src/drawscreen.c
index c60d75b3c..be4d6aa7c 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -963,7 +963,7 @@ redraw_win_toolbar(win_T *wp)
int button_attr = syn_name2attr((char_u *)"ToolbarButton");
vim_free(wp->w_winbar_items);
- for (menu = wp->w_winbar->children; menu != NULL; menu = menu->next)
+ FOR_ALL_CHILD_MENUS(wp->w_winbar, menu)
++item_count;
wp->w_winbar_items = ALLOC_CLEAR_MULT(winbar_item_T, item_count + 1);