aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-01-03 16:11:04 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-06-13 05:49:23 +0200
commitc48f6ced23e339750cb97f0eb8f32c40d52c8719 (patch)
tree5fa639c8d82e984cba4234bf06097b88c8a4243c
parent9d04727b5aa5309b46a40f69756ec8bc8e376e6c (diff)
downloadsparse-dev-c48f6ced23e339750cb97f0eb8f32c40d52c8719.tar.gz
ptrlist: let FOR_EACH_PTR() ignore tags
Since the introduction of the macro FOR_EACH_PTR_TAG() all the users of the macros FOR_EACH_PTR() & FOR_EACH_PTR_REVERSE() are only used for the usual case where no tag is used on the pointers. It is thus no more needed to strip the tag from these pointers and internally we can, for these two macros, call the simpler PTR_ENTRY_NOTAG() instead of PTR_ENTRY_UNTAG(). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--ptrlist.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/ptrlist.h b/ptrlist.h
index a1badbb7..7ab5ffe4 100644
--- a/ptrlist.h
+++ b/ptrlist.h
@@ -222,7 +222,7 @@ static inline void *last_ptr_list(struct ptr_list *list)
((__typeof__(&(ptr))) (__list->list + __nr))
#define FOR_EACH_PTR(head, ptr) \
- DO_FOR_EACH(head, ptr, __head##ptr, __list##ptr, __nr##ptr, PTR_ENTRY_UNTAG)
+ DO_FOR_EACH(head, ptr, __head##ptr, __list##ptr, __nr##ptr, PTR_ENTRY_NOTAG)
#define FOR_EACH_PTR_TAG(head, ptr) \
DO_FOR_EACH(head, ptr, __head##ptr, __list##ptr, __nr##ptr, PTR_ENTRY_UNTAG)
@@ -236,7 +236,7 @@ static inline void *last_ptr_list(struct ptr_list *list)
#define END_FOR_EACH_PTR_NOTAG(ptr) END_FOR_EACH_PTR(ptr)
#define FOR_EACH_PTR_REVERSE(head, ptr) \
- DO_FOR_EACH_REVERSE(head, ptr, __head##ptr, __list##ptr, __nr##ptr, PTR_ENTRY_UNTAG)
+ DO_FOR_EACH_REVERSE(head, ptr, __head##ptr, __list##ptr, __nr##ptr, PTR_ENTRY_NOTAG)
#define FOR_EACH_PTR_REVERSE_TAG(head, ptr) \
DO_FOR_EACH_REVERSE(head, ptr, __head##ptr, __list##ptr, __nr##ptr, PTR_ENTRY_UNTAG)