mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 16:57:44 +00:00
lib: Add const to _count() in new list APIs
Add const to the datastructure being passed to the new list APIs for the `_count()` calls. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
This commit is contained in:
parent
571a045bdf
commit
0ca16c58a8
@ -133,7 +133,7 @@ macro_pure type *prefix ## _next_safe(struct prefix##_head *h, type *item) \
|
||||
re = item ? typed_rb_next(&item->field.re) : NULL; \
|
||||
return container_of_null(re, type, field.re); \
|
||||
} \
|
||||
macro_pure size_t prefix ## _count(struct prefix##_head *h) \
|
||||
macro_pure size_t prefix ## _count(const struct prefix##_head *h) \
|
||||
{ \
|
||||
return h->rr.count; \
|
||||
} \
|
||||
|
@ -150,7 +150,7 @@ macro_pure type *prefix ## _next_safe(struct prefix##_head *h, type *item) \
|
||||
sitem = &item->field.si; \
|
||||
return container_of_null(sitem->next, type, field.si); \
|
||||
} \
|
||||
macro_pure size_t prefix ## _count(struct prefix##_head *h) \
|
||||
macro_pure size_t prefix ## _count(const struct prefix##_head *h) \
|
||||
{ \
|
||||
return h->sh.count; \
|
||||
} \
|
||||
@ -252,7 +252,7 @@ macro_pure type *prefix ## _next_safe(struct prefix##_head *h, type *item) \
|
||||
return NULL; \
|
||||
return prefix ## _next(h, item); \
|
||||
} \
|
||||
macro_pure size_t prefix ## _count(struct prefix##_head *h) \
|
||||
macro_pure size_t prefix ## _count(const struct prefix##_head *h) \
|
||||
{ \
|
||||
return h->dh.count; \
|
||||
} \
|
||||
@ -357,7 +357,7 @@ macro_pure type *prefix ## _next_safe(struct prefix##_head *h, type *item) \
|
||||
return NULL; \
|
||||
return prefix ## _next(h, item); \
|
||||
} \
|
||||
macro_pure size_t prefix ## _count(struct prefix##_head *h) \
|
||||
macro_pure size_t prefix ## _count(const struct prefix##_head *h) \
|
||||
{ \
|
||||
return h->hh.count; \
|
||||
} \
|
||||
@ -489,7 +489,7 @@ macro_pure type *prefix ## _next_safe(struct prefix##_head *h, type *item) \
|
||||
sitem = &item->field.si; \
|
||||
return container_of_null(sitem->next, type, field.si); \
|
||||
} \
|
||||
macro_pure size_t prefix ## _count(struct prefix##_head *h) \
|
||||
macro_pure size_t prefix ## _count(const struct prefix##_head *h) \
|
||||
{ \
|
||||
return h->sh.count; \
|
||||
} \
|
||||
@ -680,7 +680,7 @@ macro_pure type *prefix ## _next_safe(struct prefix##_head *h, type *item) \
|
||||
return NULL; \
|
||||
return prefix ## _next(h, item); \
|
||||
} \
|
||||
macro_pure size_t prefix ## _count(struct prefix##_head *h) \
|
||||
macro_pure size_t prefix ## _count(const struct prefix##_head *h) \
|
||||
{ \
|
||||
return h->hh.count; \
|
||||
} \
|
||||
@ -783,7 +783,7 @@ macro_pure type *prefix ## _next_safe(struct prefix##_head *h, type *item) \
|
||||
next = item ? item->field.si.next[0] : NULL; \
|
||||
return container_of_null(next, type, field.si); \
|
||||
} \
|
||||
macro_pure size_t prefix ## _count(struct prefix##_head *h) \
|
||||
macro_pure size_t prefix ## _count(const struct prefix##_head *h) \
|
||||
{ \
|
||||
return h->sh.count; \
|
||||
} \
|
||||
|
Loading…
Reference in New Issue
Block a user