]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
simplify this code by using the updated API
authorAlan T. DeKok <aland@freeradius.org>
Tue, 28 Oct 2025 12:32:53 +0000 (08:32 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 28 Oct 2025 13:07:54 +0000 (09:07 -0400)
src/lib/util/pair_legacy.c

index 465d9195631deb6de7b4aaf311c6d26ac25fa9ee..92e48d08114f5ecd0d43d64dc6cefd5280ab7933 100644 (file)
@@ -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);