From aeea72151c31d686bcbb7b06d895006d7363585c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 2 Apr 2020 18:50:46 +0200 Subject: patch 8.2.0500: using the same loop in many places Problem: Using the same loop in many places. Solution: Define more FOR_ALL macros. (Yegappan Lakshmanan, closes #5339) --- src/tag.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tag.c') diff --git a/src/tag.c b/src/tag.c index bf45b2100c..dc4b9a5712 100644 --- a/src/tag.c +++ b/src/tag.c @@ -1358,7 +1358,7 @@ find_tagfunc_tags( } taglist = rettv.vval.v_list; - for (item = taglist->lv_first; item != NULL; item = item->li_next) + FOR_ALL_LIST_ITEMS(taglist, item) { char_u *mfp; char_u *res_name, *res_fname, *res_cmd, *res_kind; @@ -4191,7 +4191,7 @@ tagstack_push_items(win_T *wp, list_T *l) int fnum; // Add one entry at a time to the tag stack - for (li = l->lv_first; li != NULL; li = li->li_next) + FOR_ALL_LIST_ITEMS(l, li) { if (li->li_tv.v_type != VAR_DICT || li->li_tv.vval.v_dict == NULL) continue; // Skip non-dict items -- cgit v1.2.3