for (vp = fr_pair_list_head(to_remove);
vp != NULL;
vp = fr_pair_list_next(to_remove, vp)) {
- fr_pair_t *found;
+ fr_pair_t *found, *next;
/*
* @todo - do this recursively.
for (found = fr_pair_find_by_da(list, NULL, vp->da);
found != NULL;
- found = fr_pair_find_by_da(list, found, vp->da)) {
+ found = next) {
int rcode;
+ next = fr_pair_find_by_da(list, found, vp->da);
+
rcode = fr_value_box_cmp_op(vp->op, &vp->data, &found->data);
if (rcode < 0) return -1;
if (!rcode) continue;
if (fr_edit_list_pair_delete(el, list, found) < 0) return -1;
- break;
}
}