From: Arran Cudbard-Bell Date: Tue, 16 May 2017 21:46:02 +0000 (-0400) Subject: Formatting X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b14fefd0789f0dbcb64bbfd477061ad16dcd22cc;p=thirdparty%2Ffreeradius-server.git Formatting --- diff --git a/src/main/tmpl.c b/src/main/tmpl.c index f250f143d09..4fefdad762e 100644 --- a/src/main/tmpl.c +++ b/src/main/tmpl.c @@ -1015,7 +1015,8 @@ ssize_t tmpl_afrom_str(TALLOC_CTX *ctx, vp_tmpl_t **out, char const *in, size_t if (do_unescape) { if (fr_value_box_from_str(ctx, &data, &data_type, NULL, in, inlen, quote) < 0) return 0; - vpt = tmpl_alloc(ctx, TMPL_TYPE_UNPARSED, data.datum.strvalue, talloc_array_length(data.datum.strvalue) - 1, type); + vpt = tmpl_alloc(ctx, TMPL_TYPE_UNPARSED, data.datum.strvalue, + talloc_array_length(data.datum.strvalue) - 1, type); talloc_free(data.datum.ptr); } else { vpt = tmpl_alloc(ctx, TMPL_TYPE_UNPARSED, in, inlen, type); @@ -1052,7 +1053,7 @@ ssize_t tmpl_afrom_str(TALLOC_CTX *ctx, vp_tmpl_t **out, char const *in, size_t */ if (do_unescape) { if (fr_value_box_from_str(ctx, &data, &data_type, NULL, in, - inlen, fr_token_quote[type]) < 0) return -1; + inlen, fr_token_quote[type]) < 0) return -1; if (do_xlat) { vpt = tmpl_alloc(ctx, TMPL_TYPE_XLAT, data.datum.strvalue, talloc_array_length(data.datum.strvalue) - 1, type); @@ -1076,9 +1077,10 @@ ssize_t tmpl_afrom_str(TALLOC_CTX *ctx, vp_tmpl_t **out, char const *in, size_t case T_BACK_QUOTED_STRING: if (do_unescape) { if (fr_value_box_from_str(ctx, &data, &data_type, NULL, in, - inlen, fr_token_quote[type]) < 0) return -1; + inlen, fr_token_quote[type]) < 0) return -1; - vpt = tmpl_alloc(ctx, TMPL_TYPE_EXEC, data.datum.strvalue, talloc_array_length(data.datum.strvalue) - 1, type); + vpt = tmpl_alloc(ctx, TMPL_TYPE_EXEC, data.datum.strvalue, + talloc_array_length(data.datum.strvalue) - 1, type); talloc_free(data.datum.ptr); } else { vpt = tmpl_alloc(ctx, TMPL_TYPE_EXEC, in, inlen, type); @@ -1154,7 +1156,7 @@ int tmpl_cast_in_place(vp_tmpl_t *vpt, fr_type_t type, fr_dict_attr_t const *enu * Why do we pass a pointer to the tmpl type? Goddamn WiMAX. */ if (fr_value_box_from_str(vpt, &vpt->tmpl_value_box, &vpt->tmpl_fr_value_box_type, - enumv, vpt->name, vpt->len, '\0') < 0) return -1; + enumv, vpt->name, vpt->len, '\0') < 0) return -1; vpt->type = TMPL_TYPE_DATA; break; @@ -1802,7 +1804,7 @@ ssize_t _tmpl_to_atype(TALLOC_CTX *ctx, void *out, * @fixme We need a way of signalling xlat not to escape things. */ ret = fr_value_box_from_str(tmp_ctx, &tmp, &src_type, NULL, - value.datum.strvalue, value.datum.length, '"'); + value.datum.strvalue, value.datum.length, '"'); if (ret < 0) goto error; value.datum.strvalue = tmp.datum.strvalue; diff --git a/src/main/xlat_eval.c b/src/main/xlat_eval.c index 622c4048047..edd168dddb0 100644 --- a/src/main/xlat_eval.c +++ b/src/main/xlat_eval.c @@ -513,7 +513,7 @@ static char *xlat_aprint(TALLOC_CTX *ctx, REQUEST *request, xlat_exp_t const * c type = FR_TYPE_STRING; if (fr_value_box_from_str(ctx, &data, &type, NULL, child, - talloc_array_length(child) - 1, '"') < 0) { + talloc_array_length(child) - 1, '"') < 0) { talloc_free(child); return NULL; }