/*
* A private function that is used only in base.c and encode.c
*/
-void *fr_dhcpv6_next_encodable(void **prev, void *to_eval, void *uctx);
+void *fr_dhcpv6_next_encodable(fr_dlist_head_t *list, void *to_eval, void *uctx);
/** DHCPV6-specific iterator
*
*/
-void *fr_dhcpv6_next_encodable(void **prev, void *to_eval, void *uctx)
+void *fr_dhcpv6_next_encodable(fr_dlist_head_t *list, void *to_eval, void *uctx)
{
- fr_pair_t *c, *p;
+ fr_pair_t *c;
fr_dict_t *dict = talloc_get_type_abort(uctx, fr_dict_t);
if (!to_eval) return NULL;
- for (p = *prev, c = to_eval; c; p = c, c = c->next) {
+ for (c = to_eval; c; c = fr_dlist_next(list, c)) {
VP_VERIFY(c);
if (c->da->dict != dict || c->da->flags.internal) continue;
if (c->da->type == FR_TYPE_BOOL && !c->vp_bool) continue;
break;
}
- *prev = p;
-
return c;
}