From: Nick Porter Date: Mon, 8 Aug 2022 09:49:13 +0000 (+0100) Subject: Correct spelling of tmpl_dcursor_clear X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d396702cc3db851ab6503cf5f0d889ddae30a0c4;p=thirdparty%2Ffreeradius-server.git Correct spelling of tmpl_dcursor_clear --- diff --git a/src/lib/server/cond_eval.c b/src/lib/server/cond_eval.c index 6e68dabe345..154d24470c9 100644 --- a/src/lib/server/cond_eval.c +++ b/src/lib/server/cond_eval.c @@ -549,7 +549,7 @@ static bool cond_compare_attrs(request_t *request, fr_value_box_t *lhs, map_t co if (rcode != 0) break; } - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); return (rcode == 1); } @@ -583,7 +583,7 @@ static bool cond_compare_virtual(request_t *request, map_t const *map) if (rcode != 0) break; } - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); return (rcode == 1); } @@ -806,7 +806,7 @@ check_attrs: continue; } - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); } break; diff --git a/src/lib/server/map.c b/src/lib/server/map.c index bfc116dd5c6..90b7d1f5091 100644 --- a/src/lib/server/map.c +++ b/src/lib/server/map.c @@ -2182,7 +2182,7 @@ update: fr_assert(fr_pair_list_empty(&src_list)); finish: - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); talloc_free(tmp_ctx); return rcode; } diff --git a/src/lib/server/map_async.c b/src/lib/server/map_async.c index e40bf4a6f7a..64a35759b83 100644 --- a/src/lib/server/map_async.c +++ b/src/lib/server/map_async.c @@ -568,20 +568,20 @@ int map_to_list_mod(TALLOC_CTX *ctx, vp_list_mod_t **out, * we should delete all LHS attributes. */ if (mutated->op == T_OP_SET) n = list_mod_delete_afrom_map(ctx, original, mutated); - tmpl_dursor_clear(&cc_attr); + tmpl_dcursor_clear(&cc_attr); goto finish; case -2: /* No matching list */ case -3: /* No request context */ case -4: /* memory allocation error */ RPEDEBUG("Failed resolving attribute source"); - tmpl_dursor_clear(&cc_attr); + tmpl_dcursor_clear(&cc_attr); goto error; } n = list_mod_generic_afrom_map(ctx, original, mutated); if (!n) { - tmpl_dursor_clear(&cc_attr); + tmpl_dcursor_clear(&cc_attr); goto error; } @@ -593,7 +593,7 @@ int map_to_list_mod(TALLOC_CTX *ctx, vp_list_mod_t **out, attr_error: fr_dcursor_head(&values); fr_dcursor_free_list(&values); - tmpl_dursor_clear(&cc_attr); + tmpl_dcursor_clear(&cc_attr); goto error; } @@ -611,7 +611,7 @@ int map_to_list_mod(TALLOC_CTX *ctx, vp_list_mod_t **out, fr_dcursor_append(&values, n_vb); } while ((vp = fr_dcursor_next(&from))); - tmpl_dursor_clear(&cc_attr); + tmpl_dcursor_clear(&cc_attr); } break; @@ -1287,6 +1287,6 @@ int map_list_mod_apply(request_t *request, vp_list_mod_t const *vlm) } finish: - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); return rcode; } diff --git a/src/lib/server/tmpl.h b/src/lib/server/tmpl.h index b6eafc1968b..29d1922fb6c 100644 --- a/src/lib/server/tmpl.h +++ b/src/lib/server/tmpl.h @@ -767,7 +767,7 @@ void tmpl_verify(char const *file, int line, tmpl_t const *vpt); vp = tmpl_cursor_next(&cursor, &list)) { // Do something } - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); @endcode * * @param _request to locate the list in. diff --git a/src/lib/server/tmpl_dcursor.c b/src/lib/server/tmpl_dcursor.c index 92294c871e2..2148b8211f0 100644 --- a/src/lib/server/tmpl_dcursor.c +++ b/src/lib/server/tmpl_dcursor.c @@ -408,7 +408,7 @@ fr_pair_t *tmpl_dcursor_init(int *err, TALLOC_CTX *ctx, tmpl_dcursor_ctx_t *cc, if (tmpl_request_ptr(&request, tmpl_request(vpt)) < 0) { if (err) *err = -3; error: - memset(cc, 0, sizeof(*cc)); /* so tmpl_dursor_clear doesn't explode */ + memset(cc, 0, sizeof(*cc)); /* so tmpl_dcursor_clear doesn't explode */ return NULL; } @@ -433,7 +433,7 @@ fr_pair_t *tmpl_dcursor_init(int *err, TALLOC_CTX *ctx, tmpl_dcursor_ctx_t *cc, /** Clear any temporary state allocations * */ -void tmpl_dursor_clear(tmpl_dcursor_ctx_t *cc) +void tmpl_dcursor_clear(tmpl_dcursor_ctx_t *cc) { /* * If the pool wasn't created, nothing was talloc'd which diff --git a/src/lib/server/tmpl_dcursor.h b/src/lib/server/tmpl_dcursor.h index 6e798a6094e..8445539e372 100644 --- a/src/lib/server/tmpl_dcursor.h +++ b/src/lib/server/tmpl_dcursor.h @@ -90,4 +90,4 @@ fr_pair_t *tmpl_dcursor_init(int *err, TALLOC_CTX *ctx, tmpl_dcursor_ctx_t *cc, fr_dcursor_t *cursor, request_t *request, tmpl_t const *vpt); -void tmpl_dursor_clear(tmpl_dcursor_ctx_t *cc); +void tmpl_dcursor_clear(tmpl_dcursor_ctx_t *cc); diff --git a/src/lib/server/tmpl_dcursor_tests.c b/src/lib/server/tmpl_dcursor_tests.c index f8166a538ee..bfe1b73275c 100644 --- a/src/lib/server/tmpl_dcursor_tests.c +++ b/src/lib/server/tmpl_dcursor_tests.c @@ -115,7 +115,7 @@ static request_t *request_fake_alloc(void) #define test_end \ vp = fr_dcursor_next(&cursor); \ TEST_CHECK(vp == NULL); \ - tmpl_dursor_clear(&cc); \ + tmpl_dcursor_clear(&cc); \ TEST_CHECK_RET(talloc_free(request), 0) /* diff --git a/src/lib/server/tmpl_eval.c b/src/lib/server/tmpl_eval.c index 528d683d61e..5854c018d1b 100644 --- a/src/lib/server/tmpl_eval.c +++ b/src/lib/server/tmpl_eval.c @@ -920,7 +920,7 @@ int tmpl_copy_pairs(TALLOC_CTX *ctx, fr_pair_list_t *out, request_t *request, tm } fr_pair_append(out, vp); } - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); return err; } @@ -971,7 +971,7 @@ int tmpl_copy_pair_children(TALLOC_CTX *ctx, fr_pair_list_t *out, request_t *req } } done: - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); return err; } @@ -1001,7 +1001,7 @@ int tmpl_find_vp(fr_pair_t **out, request_t *request, tmpl_t const *vpt) TMPL_VERIFY(vpt); vp = tmpl_dcursor_init(&err, request, &cc, &cursor, request, vpt); - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); if (out) *out = vp; @@ -1033,7 +1033,7 @@ int tmpl_find_or_add_vp(fr_pair_t **out, request_t *request, tmpl_t const *vpt) *out = NULL; vp = tmpl_dcursor_init(&err, NULL, &cc, &cursor, request, vpt); - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); switch (err) { case 0: @@ -1383,7 +1383,7 @@ done: } fail: - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); return ret; } diff --git a/src/lib/unlang/edit.c b/src/lib/unlang/edit.c index 0ec4ac34903..fb1448dc95e 100644 --- a/src/lib/unlang/edit.c +++ b/src/lib/unlang/edit.c @@ -251,14 +251,14 @@ static int remove_vps(request_t *request, edit_map_t *current) fr_assert(list != NULL); if (fr_edit_list_pair_delete(current->el, list, vp) < 0) { - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); return -1; } vp = next; } - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); return 0; } diff --git a/src/lib/unlang/xlat_builtin.c b/src/lib/unlang/xlat_builtin.c index 75bd11fb355..83cd8efac08 100644 --- a/src/lib/unlang/xlat_builtin.c +++ b/src/lib/unlang/xlat_builtin.c @@ -1131,7 +1131,7 @@ static xlat_action_t xlat_func_debug_attr(UNUSED TALLOC_CTX *ctx, UNUSED fr_dcur vp = fr_dcursor_next(&cursor)) { xlat_debug_attr_vp(request, vp, vpt); } - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); REXDENT(); talloc_free(vpt); @@ -2586,14 +2586,14 @@ static xlat_action_t xlat_func_pairs(TALLOC_CTX *ctx, fr_dcursor_t *out, if (unlikely(fr_pair_aprint(vb, &buff, NULL, vp) < 0)) { RPEDEBUG("Failed printing pair"); talloc_free(vb); - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); return XLAT_ACTION_FAIL; } fr_value_box_bstrdup_buffer_shallow(NULL, vb, NULL, buff, false); fr_dcursor_append(out, vb); } - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); talloc_free(vpt); return XLAT_ACTION_DONE; @@ -3668,7 +3668,7 @@ static xlat_action_t protocol_encode_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out, len = tp_encode->func(&FR_DBUFF_TMP(p, end), &cursor, encode_ctx); if (len < 0) { RPEDEBUG("Protocol encoding failed"); - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); talloc_free(vpt); return XLAT_ACTION_FAIL; } @@ -3677,7 +3677,7 @@ static xlat_action_t protocol_encode_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out, p += len; } - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); talloc_free(vpt); /* diff --git a/src/lib/unlang/xlat_expr.c b/src/lib/unlang/xlat_expr.c index 6e87ed0952f..c3ba9ada926 100644 --- a/src/lib/unlang/xlat_expr.c +++ b/src/lib/unlang/xlat_expr.c @@ -1508,7 +1508,7 @@ static xlat_action_t xlat_attr_exists(TALLOC_CTX *ctx, fr_dcursor_t *out, } if (do_free) talloc_const_free(vpt); - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); fr_dcursor_append(out, dst); return XLAT_ACTION_DONE; } diff --git a/src/modules/rlm_linelog/rlm_linelog.c b/src/modules/rlm_linelog/rlm_linelog.c index 5861791f24e..6512e10cbc9 100644 --- a/src/modules/rlm_linelog/rlm_linelog.c +++ b/src/modules/rlm_linelog/rlm_linelog.c @@ -601,7 +601,7 @@ build_vector: vector[i].iov_len = inst->delimiter_len; } } - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); vector_p = vector; vector_len = i; } diff --git a/src/modules/rlm_smtp/rlm_smtp.c b/src/modules/rlm_smtp/rlm_smtp.c index 487f84ab151..5be4ec89fe5 100644 --- a/src/modules/rlm_smtp/rlm_smtp.c +++ b/src/modules/rlm_smtp/rlm_smtp.c @@ -247,7 +247,7 @@ static int tmpl_attr_to_slist(fr_mail_ctx_t *uctx, struct curl_slist **out, tmpl } /* Return the number of elements which were found */ - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); return count; } @@ -301,7 +301,7 @@ static ssize_t tmpl_attr_to_sbuff(fr_mail_ctx_t *uctx, fr_sbuff_t *out, tmpl_t c copied += fr_sbuff_in_strcpy(out, delimiter); } } - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); return copied; } @@ -418,7 +418,7 @@ static int tmpl_attr_to_attachment(fr_mail_ctx_t *uctx, curl_mime *mime, const t attachments_set += str_to_attachments(uctx, mime, vp->vp_strvalue, vp->vp_length, path_buffer, m); } - tmpl_dursor_clear(&cc); + tmpl_dcursor_clear(&cc); return attachments_set; }