]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
s/fr_cursor/fr_dcursor/ in lib/unlang/xlat_eval.c
authorNick Porter <nick@portercomputing.co.uk>
Tue, 29 Dec 2020 14:07:27 +0000 (14:07 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 21 Jan 2021 23:05:49 +0000 (23:05 +0000)
Only in functions using fr_pair_t

src/lib/unlang/xlat_eval.c

index 89d20a60f2aac6a49eedd48b7733080463b72df9..0df10bb2374a7a991de9e5d5e6e58eead760e9ce 100644 (file)
@@ -561,7 +561,7 @@ static xlat_action_t xlat_eval_pair_real(TALLOC_CTX *ctx, fr_cursor_t *out, requ
        fr_pair_t               *vp = NULL;
        fr_value_box_t          *value;
 
-       fr_cursor_t             cursor;
+       fr_dcursor_t            cursor;
        tmpl_cursor_ctx_t       cc;
 
        xlat_action_t           ret = XLAT_ACTION_DONE;
@@ -614,9 +614,9 @@ static xlat_action_t xlat_eval_pair_real(TALLOC_CTX *ctx, fr_cursor_t *out, requ
        {
                uint32_t                count = 0;
 
-               for (vp = fr_cursor_current(&cursor);
+               for (vp = fr_dcursor_current(&cursor);
                     vp;
-                    vp = fr_cursor_next(&cursor)) count++;
+                    vp = fr_dcursor_next(&cursor)) count++;
 
                value = fr_value_box_alloc(ctx, FR_TYPE_UINT32, NULL, false);
                value->datum.uint32 = count;
@@ -629,15 +629,15 @@ static xlat_action_t xlat_eval_pair_real(TALLOC_CTX *ctx, fr_cursor_t *out, requ
         *      Output multiple #value_box_t, one per attribute.
         */
        case NUM_ALL:
-               if (!fr_cursor_current(&cursor)) goto done;
+               if (!fr_dcursor_current(&cursor)) goto done;
 
                /*
                 *      Loop over all matching #fr_value_pair
                 *      shallow copying buffers.
                 */
-               for (vp = fr_cursor_current(&cursor);   /* Initialised above to the first matching attribute */
+               for (vp = fr_dcursor_current(&cursor);  /* Initialised above to the first matching attribute */
                     vp;
-                    vp = fr_cursor_next(&cursor)) {
+                    vp = fr_dcursor_next(&cursor)) {
                        value = fr_value_box_alloc(ctx, vp->data.type, vp->da, vp->data.tainted);
                        fr_value_box_copy(value, value, &vp->data);
                        fr_cursor_append(out, value);
@@ -650,7 +650,7 @@ static xlat_action_t xlat_eval_pair_real(TALLOC_CTX *ctx, fr_cursor_t *out, requ
                 *      The cursor was set to the correct
                 *      position above by tmpl_cursor_init.
                 */
-               vp = fr_cursor_current(&cursor);                        /* NULLness checked above */
+               vp = fr_dcursor_current(&cursor);                       /* NULLness checked above */
                value = fr_value_box_alloc(ctx, vp->data.type, vp->da, vp->data.tainted);
                if (!value) goto oom;