]> git.proxmox.com Git - mirror_frr.git/commitdiff
Revert "lib: Make _find functions treat the head as const"
authorDavid Lamparter <equinox@diac24.net>
Tue, 21 May 2019 02:53:30 +0000 (04:53 +0200)
committerDavid Lamparter <equinox@diac24.net>
Tue, 21 May 2019 03:42:13 +0000 (05:42 +0200)
This reverts commit 98d28ef55dd11a6efaa2bf3101ac57cf78e803bb.

No longer needed with previous commit.

Signed-off-by: David Lamparter <equinox@diac24.net>
lib/typesafe.h

index 7783d07072de9d228247d6cc896c996c47b7d659..6df3a07efe95ebac3f7d4801c3c029f8b59acd10 100644 (file)
@@ -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);                    \