]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
make use-specific variables
authorAlan T. DeKok <aland@freeradius.org>
Fri, 18 Nov 2022 13:50:50 +0000 (08:50 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 21 Nov 2022 15:51:07 +0000 (10:51 -0500)
so we can do nested loops with fr_pair_list_foreach() macros

src/lib/util/pair.h

index 7106f562da0be25d227310842706ab6c98a3acca..ab7013f900f4612006d74b6374fb06e4238efc0c 100644 (file)
@@ -256,7 +256,7 @@ static inline bool vp_da_data_type_check(fr_pair_t *vp)
  *                             Will be declared in the scope of the loop.
  */
 #define fr_pair_list_foreach(_list_head, _iter) \
-       for (fr_pair_t *_next, *_iter = fr_pair_list_head(_list_head); _next = fr_pair_list_next(_list_head, _iter), _iter != NULL; _iter = _next)
+       for (fr_pair_t *JOIN(_next,_iter), *_iter = fr_pair_list_head(_list_head); JOIN(_next,_iter) = fr_pair_list_next(_list_head, _iter), _iter != NULL; _iter = JOIN(_next,_iter))
 
 /** Append a pair to a list, assigning its value.
  *