diff options
author | David Lamparter <equinox@diac24.net> | 2019-05-21 04:53:30 +0200 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2019-05-21 05:42:13 +0200 |
commit | 791ac7c7e7f97379f9a0ca975637bd1530dc8480 (patch) | |
tree | 45590473a8e52669141f67296709802d282a297c /lib/typesafe.h | |
parent | lib/table: remove nonsensical const, add pure (diff) | |
download | frr-791ac7c7e7f97379f9a0ca975637bd1530dc8480.tar.xz frr-791ac7c7e7f97379f9a0ca975637bd1530dc8480.zip |
Revert "lib: Make _find functions treat the head as const"
This reverts commit 98d28ef55dd11a6efaa2bf3101ac57cf78e803bb.
No longer needed with previous commit.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/typesafe.h')
-rw-r--r-- | lib/typesafe.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/typesafe.h b/lib/typesafe.h index 7783d0707..6df3a07ef 100644 --- a/lib/typesafe.h +++ b/lib/typesafe.h @@ -490,7 +490,7 @@ macro_pure size_t prefix ## _count(struct prefix##_head *h) \ #define DECLARE_SORTLIST_UNIQ(prefix, type, field, cmpfn) \ _DECLARE_SORTLIST(prefix, type, field, cmpfn, cmpfn) \ \ -macro_inline type *prefix ## _find(const struct prefix##_head *h, const type *item) \ +macro_inline type *prefix ## _find(struct prefix##_head *h, const type *item) \ { \ struct ssort_item *sitem = h->sh.first; \ int cmpval = 0; \ @@ -598,7 +598,7 @@ macro_inline type *prefix ## _add(struct prefix##_head *h, type *item) \ *np = &item->field.hi; \ return NULL; \ } \ -macro_inline type *prefix ## _find(const struct prefix##_head *h, const type *item) \ +macro_inline type *prefix ## _find(struct prefix##_head *h, const type *item) \ { \ if (!h->hh.tabshift) \ return NULL; \ @@ -788,7 +788,7 @@ macro_inline int prefix ## __cmp(const struct sskip_item *a, \ return cmpfn(container_of(a, type, field.si), \ container_of(b, type, field.si)); \ } \ -macro_inline type *prefix ## _find(const struct prefix##_head *h, const type *item) \ +macro_inline type *prefix ## _find(struct prefix##_head *h, const type *item) \ { \ struct sskip_item *sitem = typesafe_skiplist_find(&h->sh, \ &item->field.si, &prefix ## __cmp); \ |