From: Alan T. DeKok Date: Tue, 28 Oct 2025 12:32:53 +0000 (-0400) Subject: simplify this code by using the updated API X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=51a62d222b698865ce66bc38c3845ee76f8be1ee;p=thirdparty%2Ffreeradius-server.git simplify this code by using the updated API --- diff --git a/src/lib/util/pair_legacy.c b/src/lib/util/pair_legacy.c index 465d919563..92e48d0811 100644 --- a/src/lib/util/pair_legacy.c +++ b/src/lib/util/pair_legacy.c @@ -519,20 +519,9 @@ redo: goto leaf; } else { leaf: - /* - * In the common case, we jump ahead one level. - * - * But for ALIAS, we may jump ahead multiple levels. - */ - if ((relative->da->depth + 1) == da->depth) { - if (fr_pair_append_by_da(relative->ctx, &vp, relative->list, da) < 0) { - return fr_sbuff_error(&our_in); - } - } else { - vp = fr_pair_afrom_da_depth_nested(relative->ctx, relative->list, da, - relative->da->depth); - if (!vp) return fr_sbuff_error(&our_in); - } + vp = fr_pair_afrom_da_depth_nested(relative->ctx, relative->list, da, + relative->da->depth); + if (!vp) return fr_sbuff_error(&our_in); } fr_assert(vp != NULL);