Revert "lib: add a frr_each_const macro"

This reverts commit 72eae2c3cb.

`frr_each_const(X, ...)` is not needed since it is the same as
`frr_each(X_const, ...)`.

The fact that it wasn't properly set up for clang-format, and that then
work-arounded with "clang-format off" is all the more reason to not do
this.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
David Lamparter 2023-09-07 12:05:29 +02:00
parent f3434880b6
commit 36bd815ba7
2 changed files with 1 additions and 7 deletions

View file

@ -127,10 +127,7 @@ _isis_flex_algo_elected(int algorithm, const struct isis_area *area,
* Perform FAD comparison. First, compare the priority, and if they are
* the same, compare the sys-id.
*/
/* clang-format off */
frr_each_const(lspdb, &area->lspdb[ISIS_LEVEL1 - 1], lsp) {
/* clang-format on */
frr_each (lspdb_const, &area->lspdb[ISIS_LEVEL1 - 1], lsp) {
if (!lsp->tlvs || !lsp->tlvs->router_cap)
continue;

View file

@ -20,9 +20,6 @@ extern "C" {
#define frr_each(prefix, head, item) \
for (item = prefix##_first(head); item; \
item = prefix##_next(head, item))
#define frr_each_const(prefix, head, item) \
for (item = prefix##_const_first(head); item; \
item = prefix##_const_next(head, item))
#define frr_each_safe(prefix, head, item) \
for (typeof(prefix##_next_safe(head, NULL)) prefix##_safe = \
prefix##_next_safe(head, \