From: Arran Cudbard-Bell Date: Fri, 30 Aug 2019 20:07:52 +0000 (-0400) Subject: s/fr_skip_spaces/fr_skip_whitespace/ X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a435bee071453bb80a9c83956c19cf1ff4f6cf1;p=thirdparty%2Ffreeradius-server.git s/fr_skip_spaces/fr_skip_whitespace/ --- diff --git a/src/bin/unit_test_attribute.c b/src/bin/unit_test_attribute.c index 44daddc563c..697d69dc7c4 100644 --- a/src/bin/unit_test_attribute.c +++ b/src/bin/unit_test_attribute.c @@ -171,7 +171,7 @@ static int encode_data_tlv(char *buffer, char **endptr, *p = '\0'; p = buffer + 1; - fr_skip_spaces(p); + fr_skip_whitespace(p); length = encode_tlv(p, output, outlen); if (length == 0) return 0; @@ -185,7 +185,7 @@ static int encode_hex(char *p, uint8_t *output, size_t outlen) while (*p) { char *c1, *c2; - fr_skip_spaces(p); + fr_skip_whitespace(p); if (!*p) break; @@ -222,7 +222,7 @@ static int encode_data(char *p, uint8_t *output, size_t outlen) return 0; } - fr_skip_spaces(p); + fr_skip_whitespace(p); if (*p == '{') { int sublen; @@ -231,7 +231,7 @@ static int encode_data(char *p, uint8_t *output, size_t outlen) length = 0; do { - fr_skip_spaces(p); + fr_skip_whitespace(p); if (!*p) { if (length == 0) { fprintf(stderr, "No data\n"); @@ -721,14 +721,14 @@ static void command_add(TALLOC_CTX *ctx, char *input, char *output, size_t outle * Set the name and try to find the syntax. */ name = p; - fr_skip_spaces(p); + fr_skip_whitespace(p); if (isspace(*p)) { *p = '\0'; p++; } - fr_skip_spaces(p); + fr_skip_whitespace(p); if (*p) { table->syntax = talloc_strdup(table, p); @@ -882,7 +882,7 @@ do { \ ((p > buffer) && (p[-1] != '[')))) *p = '\0'; p = buffer; - fr_skip_spaces(p); + fr_skip_whitespace(p); if (!*p) continue; DEBUG2("%s[%d]: %s\n", filename, lineno, buffer); @@ -1163,7 +1163,7 @@ do { \ if (strcmp(test_type, "$INCLUDE") == 0) { p += 9; - fr_skip_spaces(p); + fr_skip_whitespace(p); q = strrchr(directory, '/'); if (q) { @@ -1370,7 +1370,7 @@ do { \ fr_value_box_t *box2; fr_skip_not_whitespace(p); - fr_skip_spaces(p); + fr_skip_whitespace(p); if (fr_value_box_from_str(box, box, &type, NULL, p, -1, '"', false) < 0) { snprintf(output, sizeof(output), "ERROR parsing value: %s", diff --git a/src/bin/unit_test_module.c b/src/bin/unit_test_module.c index 2a76ef387f7..02b17b0717c 100644 --- a/src/bin/unit_test_module.c +++ b/src/bin/unit_test_module.c @@ -476,7 +476,7 @@ static bool do_xlats(char const *filename, FILE *fp) * Ignore blank lines and comments */ p = input; - fr_skip_spaces(p); + fr_skip_whitespace(p); if (*p < ' ') continue; if (*p == '#') continue; diff --git a/src/lib/server/cf_file.c b/src/lib/server/cf_file.c index 3900820b14c..8cfa5840950 100644 --- a/src/lib/server/cf_file.c +++ b/src/lib/server/cf_file.c @@ -817,7 +817,7 @@ static int cf_section_read(char const *filename, int *lineno, FILE *fp, if (has_spaces) { ptr = cbuff; - fr_skip_spaces(ptr); + fr_skip_whitespace(ptr); if (ptr > cbuff) { memmove(cbuff, ptr, len - (ptr - cbuff)); @@ -833,7 +833,7 @@ static int cf_section_read(char const *filename, int *lineno, FILE *fp, if (at_eof) break; ptr = buff[0]; - fr_skip_spaces(ptr); + fr_skip_whitespace(ptr); #ifdef WITH_CONF_WRITE /* @@ -1413,7 +1413,7 @@ static int cf_section_read(char const *filename, int *lineno, FILE *fp, case T_OP_EQ: case T_OP_SET: - fr_skip_spaces(ptr); + fr_skip_whitespace(ptr); /* * New parser: non-quoted strings are @@ -1558,7 +1558,7 @@ static int cf_section_read(char const *filename, int *lineno, FILE *fp, /* * Require a comma, unless there's a comment. */ - fr_skip_spaces(ptr); + fr_skip_whitespace(ptr); if (*ptr == ',') { ptr++; @@ -1654,7 +1654,7 @@ static int cf_section_read(char const *filename, int *lineno, FILE *fp, /* * Done parsing one thing. Skip to EOL if possible. */ - fr_skip_spaces(ptr); + fr_skip_whitespace(ptr); if (*ptr == '#') continue; diff --git a/src/lib/server/command.c b/src/lib/server/command.c index 4bc4dce72e3..a90dc7722c2 100644 --- a/src/lib/server/command.c +++ b/src/lib/server/command.c @@ -1871,7 +1871,7 @@ static char const *skip_word(char const *text) char const *word = text; if ((*word != '"') && (*word != '\'')) { - while (*word && !isspace((int) *word)) word++; + fr_skip_not_whitespace(word); return word; } @@ -1911,7 +1911,7 @@ static int syntax_str_to_argv(int start_argc, fr_cmd_argv_t *start, fr_cmd_info_ *runnable = false; while (argv) { - fr_skip_spaces(word); + fr_skip_whitespace(word); if (!*word) goto done; @@ -2168,7 +2168,7 @@ int fr_command_str_to_argv(fr_cmd_t *head, fr_cmd_info_t *info, char const *text cmd = info->cmd[argc]; rad_assert(cmd != NULL); - fr_skip_spaces(word); + fr_skip_whitespace(word); if ((word[0] == '*') && isspace(word[1]) && cmd->added_name) { p = word + 1; @@ -2206,7 +2206,7 @@ skip_matched: * Search the remaining text for matching commands. */ while (cmd) { - fr_skip_spaces(word); + fr_skip_whitespace(word); /* * Skip commands which we shouldn't know about... @@ -2326,7 +2326,7 @@ check_syntax: * runnable. */ if (!cmd->syntax_argv) { - fr_skip_spaces(word); + fr_skip_whitespace(word); if (*word > 0) goto too_many; @@ -2348,7 +2348,7 @@ check_syntax: * input. */ if (!info->runnable && *word) { - fr_skip_spaces(word); + fr_skip_whitespace(word); if (*word) goto too_many; } @@ -2472,7 +2472,7 @@ static int expand_syntax(fr_cmd_t *cmd, fr_cmd_info_t *info, fr_cmd_argv_t *argv * Loop over syntax_argv, looking for matches. */ for (/* nothing */ ; argv != NULL; argv = argv->next) { - fr_skip_spaces(word); + fr_skip_whitespace(word); if (!*word) { return expand_all(cmd, info, argv, count, max_expansions, expansions); @@ -2669,7 +2669,7 @@ int fr_command_complete(fr_cmd_t *head, char const *text, int start, * Try to do this without mangling "text". */ while (cmd) { - fr_skip_spaces(word); + fr_skip_whitespace(word); /* * Skip commands which we shouldn't know about... @@ -2794,7 +2794,7 @@ int fr_command_print_help(FILE *fp, fr_cmd_t *head, char const *text) * Try to do this without mangling "text". */ while (cmd) { - fr_skip_spaces(word); + fr_skip_whitespace(word); /* * End of the input. Tab expand everything here. diff --git a/src/lib/server/cond_tokenize.c b/src/lib/server/cond_tokenize.c index f1bd311f935..1aa78aad7be 100644 --- a/src/lib/server/cond_tokenize.c +++ b/src/lib/server/cond_tokenize.c @@ -611,7 +611,7 @@ static ssize_t cond_tokenize(TALLOC_CTX *ctx, fr_cond_t **pcond, char const **er rad_assert(c != NULL); lhs_type = rhs_type = T_INVALID; - fr_skip_spaces(p); /* skip spaces before condition */ + fr_skip_whitespace(p); /* skip spaces before condition */ if (!*p) { return_P("Empty condition is invalid"); @@ -623,7 +623,7 @@ static ssize_t cond_tokenize(TALLOC_CTX *ctx, fr_cond_t **pcond, char const **er if (*p == '!') { p++; c->negate = true; - fr_skip_spaces(p); /* skip spaces after negation */ + fr_skip_whitespace(p); /* skip spaces after negation */ /* * Just for stupidity @@ -653,7 +653,7 @@ static ssize_t cond_tokenize(TALLOC_CTX *ctx, fr_cond_t **pcond, char const **er } p += slen; - fr_skip_spaces(p); /* skip spaces after (COND)*/ + fr_skip_whitespace(p); /* skip spaces after (COND)*/ goto closing_brace; } @@ -689,7 +689,7 @@ static ssize_t cond_tokenize(TALLOC_CTX *ctx, fr_cond_t **pcond, char const **er } p += slen; - fr_skip_spaces(p); + fr_skip_whitespace(p); /* * (FOO) @@ -839,7 +839,7 @@ static ssize_t cond_tokenize(TALLOC_CTX *ctx, fr_cond_t **pcond, char const **er break; } - fr_skip_spaces(p); /* skip spaces after operator */ + fr_skip_whitespace(p); /* skip spaces after operator */ if (!*p) { return_P("Expected text after operator"); @@ -1008,7 +1008,7 @@ static ssize_t cond_tokenize(TALLOC_CTX *ctx, fr_cond_t **pcond, char const **er } p += slen; - fr_skip_spaces(p); /* skip spaces after RHS */ + fr_skip_whitespace(p); /* skip spaces after RHS */ } /* parse OP RHS */ closing_brace: @@ -1021,7 +1021,7 @@ closing_brace: } p++; - fr_skip_spaces(p); /* skip spaces after closing brace */ + fr_skip_whitespace(p); /* skip spaces after closing brace */ goto done; } diff --git a/src/lib/server/tmpl.c b/src/lib/server/tmpl.c index 42ff4e5cbdc..72a823420a9 100644 --- a/src/lib/server/tmpl.c +++ b/src/lib/server/tmpl.c @@ -2926,7 +2926,7 @@ ssize_t tmpl_preparse(char const **out, size_t *outlen, char const *start, *type = T_INVALID; if (castda) *castda = NULL; - fr_skip_spaces(p); + fr_skip_whitespace(p); if (*p == '<') { fr_type_t cast; @@ -2939,7 +2939,7 @@ ssize_t tmpl_preparse(char const **out, size_t *outlen, char const *start, } p++; - fr_skip_spaces(p); + fr_skip_whitespace(p); for (q = p; *q && !isspace((int) *q) && (*q != '>'); q++) { /* nothing */ @@ -2964,13 +2964,13 @@ ssize_t tmpl_preparse(char const **out, size_t *outlen, char const *start, } p = q; - fr_skip_spaces(p); + fr_skip_whitespace(p); if (*p != '>') { return_P("Expected '>'"); } p++; - fr_skip_spaces(p); + fr_skip_whitespace(p); } if (require_regex) { diff --git a/src/lib/server/users_file.c b/src/lib/server/users_file.c index 7aa05964d21..f605189209c 100644 --- a/src/lib/server/users_file.c +++ b/src/lib/server/users_file.c @@ -137,7 +137,7 @@ int pairlist_read(TALLOC_CTX *ctx, fr_dict_t const *dict, char const *file, PAIR * ignore it. */ ptr = buffer; - fr_skip_spaces(ptr); + fr_skip_whitespace(ptr); if (*ptr == '#' || *ptr == '\n' || !*ptr) continue; @@ -165,7 +165,7 @@ parse_again: * $INCLUDE filename */ if (strcasecmp(entry, "$INCLUDE") == 0) { - fr_skip_spaces(ptr); + fr_skip_whitespace(ptr); /* * If it's an absolute pathname, diff --git a/src/lib/server/xlat_builtin.c b/src/lib/server/xlat_builtin.c index 82b2df3c26b..abfa726efd6 100644 --- a/src/lib/server/xlat_builtin.c +++ b/src/lib/server/xlat_builtin.c @@ -159,7 +159,7 @@ int xlat_fmt_to_cursor(TALLOC_CTX *ctx, fr_cursor_t **out, VALUE_PAIR *vp; fr_cursor_t *cursor; - fr_skip_spaces(fmt); /* Not binary safe, but attr refs should only contain printable chars */ + fr_skip_whitespace(fmt); /* Not binary safe, but attr refs should only contain printable chars */ if (tmpl_afrom_attr_str(NULL, NULL, &vpt, fmt, &(vp_tmpl_rules_t){ @@ -257,7 +257,7 @@ static ssize_t xlat_func_integer(UNUSED TALLOC_CTX *ctx, char **out, size_t outl uint64_t int64 = 0; /* Needs to be initialised to zero */ uint32_t int32 = 0; /* Needs to be initialised to zero */ - fr_skip_spaces(fmt); + fr_skip_whitespace(fmt); if ((xlat_fmt_get_vp(&vp, request, fmt) < 0) || !vp) return 0; @@ -446,7 +446,7 @@ static ssize_t xlat_func_debug_attr(UNUSED TALLOC_CTX *ctx, UNUSED char **out, U if (!RDEBUG_ENABLED2) return 0; /* NOOP if debugging isn't enabled */ - fr_skip_spaces(fmt); + fr_skip_whitespace(fmt); if (tmpl_afrom_attr_str(request, NULL, &vpt, fmt, &(vp_tmpl_rules_t){ @@ -681,7 +681,7 @@ static ssize_t xlat_func_xlat(TALLOC_CTX *ctx, char **out, size_t outlen, ssize_t slen; VALUE_PAIR *vp; - fr_skip_spaces(fmt); + fr_skip_whitespace(fmt); if (outlen < 3) { nothing: @@ -1690,7 +1690,7 @@ static ssize_t xlat_func_explode(TALLOC_CTX *ctx, char **out, size_t outlen, /* * Trim whitespace */ - fr_skip_spaces(p); + fr_skip_whitespace(p); slen = tmpl_afrom_attr_substr(ctx, NULL, &vpt, p, -1, &(vp_tmpl_rules_t){ .dict_def = request->dict }); if (slen <= 0) { @@ -1916,7 +1916,7 @@ static ssize_t parse_pad(vp_tmpl_t **vpt_p, size_t *pad_len_p, char *pad_char_p, *vpt_p = NULL; p = fmt; - fr_skip_spaces(p); + fr_skip_whitespace(p); if (*p != '&') { REDEBUG("First argument must be an attribute reference"); @@ -1931,7 +1931,7 @@ static ssize_t parse_pad(vp_tmpl_t **vpt_p, size_t *pad_len_p, char *pad_char_p, p = fmt + slen; - fr_skip_spaces(p); + fr_skip_whitespace(p); pad_len = strtoul(p, &end, 10); if ((pad_len == ULONG_MAX) || (pad_len > 8192)) { @@ -1955,7 +1955,7 @@ static ssize_t parse_pad(vp_tmpl_t **vpt_p, size_t *pad_len_p, char *pad_char_p, return fmt - p; } - fr_skip_spaces(p); + fr_skip_whitespace(p); if (p[1] != '\0') { talloc_free(vpt); diff --git a/src/lib/sim/xlat.c b/src/lib/sim/xlat.c index 512e6e68118..04fe102d05b 100644 --- a/src/lib/sim/xlat.c +++ b/src/lib/sim/xlat.c @@ -47,7 +47,7 @@ static ssize_t sim_xlat_id_method(TALLOC_CTX *ctx, char **out, UNUSED size_t out /* * Trim whitespace */ - fr_skip_spaces(p); + fr_skip_whitespace(p); slen = tmpl_afrom_attr_substr(our_ctx, NULL, &vpt, p, -1, &(vp_tmpl_rules_t){ @@ -101,7 +101,7 @@ static ssize_t sim_xlat_id_type(TALLOC_CTX *ctx, char **out, UNUSED size_t outle /* * Trim whitespace */ - fr_skip_spaces(p); + fr_skip_whitespace(p); slen = tmpl_afrom_attr_substr(our_ctx, NULL, &vpt, p, -1, &(vp_tmpl_rules_t){ @@ -154,7 +154,7 @@ static ssize_t sim_xlat_3gpp_pseudonym_key_index(TALLOC_CTX *ctx, char **out, UN /* * Trim whitespace */ - fr_skip_spaces(p); + fr_skip_whitespace(p); slen = tmpl_afrom_attr_substr(our_ctx, NULL, &vpt, p, -1, &(vp_tmpl_rules_t){ @@ -202,7 +202,7 @@ static ssize_t sim_xlat_3gpp_pseudonym_decrypt(TALLOC_CTX *ctx, char **out, UNUS /* * Trim whitespace */ - fr_skip_spaces(p); + fr_skip_whitespace(p); slen = tmpl_afrom_attr_substr(our_ctx, NULL, &id_vpt, p, -1, &(vp_tmpl_rules_t){ @@ -314,7 +314,7 @@ static ssize_t sim_xlat_3gpp_pseudonym_encrypt(TALLOC_CTX *ctx, char **out, UNUS /* * Trim whitespace */ - fr_skip_spaces(p); + fr_skip_whitespace(p); slen = tmpl_afrom_attr_substr(our_ctx, NULL, &id_vpt, p, -1, &(vp_tmpl_rules_t){ diff --git a/src/lib/unlang/interpret.c b/src/lib/unlang/interpret.c index 2710e6c9ecf..d165feeaab8 100644 --- a/src/lib/unlang/interpret.c +++ b/src/lib/unlang/interpret.c @@ -1283,7 +1283,7 @@ static ssize_t unlang_interpret_xlat(UNUSED TALLOC_CTX *ctx, char **out, size_t unlang_stack_frame_t *frame; unlang_t *instruction; - fr_skip_spaces(fmt); + fr_skip_whitespace(fmt); /* * Find the correct stack frame. diff --git a/src/lib/util/misc.h b/src/lib/util/misc.h index 72779daf01a..95854c94773 100644 --- a/src/lib/util/misc.h +++ b/src/lib/util/misc.h @@ -66,7 +66,7 @@ void fr_talloc_verify_cb(const void *ptr, int depth, * * @param[in,out] _p string to skip over. */ -#define fr_skip_spaces(_p) while(isspace((int)*(_p))) _p++ +#define fr_skip_whitespace(_p) while(isspace((int)*(_p))) _p++ /** Skip everything that's not whitespace ('\\t', '\\n', '\\v', '\\f', '\\r', ' ') * diff --git a/src/lib/util/pair.c b/src/lib/util/pair.c index 2ce6d428693..a58a830cd07 100644 --- a/src/lib/util/pair.c +++ b/src/lib/util/pair.c @@ -259,12 +259,12 @@ ssize_t fr_pair_afrom_substr(TALLOC_CTX *ctx, VALUE_PAIR **out, p += slen; - fr_skip_spaces(p); + fr_skip_whitespace(p); if (*p != '=') { fr_strerror_printf("Invalid operator '%c'", *p); return -(p - in); } - fr_skip_spaces(p); + fr_skip_whitespace(p); switch (*p) { diff --git a/src/lib/util/token.c b/src/lib/util/token.c index f42a0f4e2a8..a57d70ba627 100644 --- a/src/lib/util/token.c +++ b/src/lib/util/token.c @@ -268,7 +268,7 @@ static FR_TOKEN getthing(char const **ptr, char *buf, int buflen, bool tok, /* Skip whitespace */ p = *ptr; - fr_skip_spaces(p); + fr_skip_whitespace(p); if (!*p) { *ptr = p; @@ -421,7 +421,7 @@ static FR_TOKEN getthing(char const **ptr, char *buf, int buflen, bool tok, done: /* Skip whitespace again. */ - fr_skip_spaces(p); + fr_skip_whitespace(p); *ptr = p; @@ -473,7 +473,7 @@ FR_TOKEN getstring(char const **ptr, char *buf, int buflen, bool unescape) p = *ptr; - fr_skip_spaces(p); + fr_skip_whitespace(p); *ptr = p; diff --git a/src/lib/util/trie.c b/src/lib/util/trie.c index 90ea715c7d4..8debc67e05d 100644 --- a/src/lib/util/trie.c +++ b/src/lib/util/trie.c @@ -3290,7 +3290,7 @@ int main(int argc, char **argv) * Skip leading whitespace. */ p = buffer; - fr_skip_spaces(p); + fr_skip_whitespace(p); /* * Skip (now) blank lines. diff --git a/src/lib/util/value.c b/src/lib/util/value.c index 5f4a78dc93f..c1fbd251d53 100644 --- a/src/lib/util/value.c +++ b/src/lib/util/value.c @@ -3583,7 +3583,7 @@ static int fr_value_box_from_integer_str(fr_value_box_t *dst, fr_type_t dst_type case FR_TYPE_UINT16: case FR_TYPE_UINT32: case FR_TYPE_UINT64: - fr_skip_spaces(in); + fr_skip_whitespace(in); if (*in == '-') { fr_strerror_printf("Invalid negative value \"%s\" for unsigned integer", in); diff --git a/src/modules/rlm_dict/rlm_dict.c b/src/modules/rlm_dict/rlm_dict.c index adca7d995e3..722e3c494a7 100644 --- a/src/modules/rlm_dict/rlm_dict.c +++ b/src/modules/rlm_dict/rlm_dict.c @@ -92,7 +92,7 @@ static ssize_t xlat_vendor(TALLOC_CTX *ctx, char **out, UNUSED size_t outlen, VALUE_PAIR *vp; fr_dict_vendor_t const *vendor; - fr_skip_spaces(fmt); + fr_skip_whitespace(fmt); if ((xlat_fmt_get_vp(&vp, request, fmt) < 0) || !vp) return 0; @@ -112,7 +112,7 @@ static ssize_t xlat_vendor_num(TALLOC_CTX *ctx, char **out, UNUSED size_t outlen { VALUE_PAIR *vp; - fr_skip_spaces(fmt); + fr_skip_whitespace(fmt); if ((xlat_fmt_get_vp(&vp, request, fmt) < 0) || !vp) return 0; @@ -129,7 +129,7 @@ static ssize_t xlat_attr(TALLOC_CTX *ctx, char **out, size_t outlen, { VALUE_PAIR *vp; - fr_skip_spaces(fmt); + fr_skip_whitespace(fmt); if ((xlat_fmt_get_vp(&vp, request, fmt) < 0) || !vp) return 0; strlcpy(*out, vp->da->name, outlen); @@ -147,7 +147,7 @@ static ssize_t xlat_attr_num(TALLOC_CTX *ctx, char **out, UNUSED size_t outlen, { VALUE_PAIR *vp; - fr_skip_spaces(fmt); + fr_skip_whitespace(fmt); if ((xlat_fmt_get_vp(&vp, request, fmt) < 0) || !vp) return 0; diff --git a/src/modules/rlm_expr/rlm_expr.c b/src/modules/rlm_expr/rlm_expr.c index e2c0c1c6af2..9aaacbbfd57 100644 --- a/src/modules/rlm_expr/rlm_expr.c +++ b/src/modules/rlm_expr/rlm_expr.c @@ -167,7 +167,7 @@ static bool get_number(REQUEST *request, char const **string, int64_t *answer) /* * Look for a number. */ - fr_skip_spaces(p); + fr_skip_whitespace(p); /* * ~1 == 0xff...ffe @@ -453,7 +453,7 @@ static bool get_expression(REQUEST *request, char const **string, int64_t *answe if (!get_number(request, &p, &lhs)) return false; redo: - fr_skip_spaces(p); + fr_skip_whitespace(p); /* * A number by itself is OK. diff --git a/src/modules/rlm_isc_dhcp/rlm_isc_dhcp.c b/src/modules/rlm_isc_dhcp/rlm_isc_dhcp.c index 4ad6485a9f1..235f9dad080 100644 --- a/src/modules/rlm_isc_dhcp/rlm_isc_dhcp.c +++ b/src/modules/rlm_isc_dhcp/rlm_isc_dhcp.c @@ -239,7 +239,7 @@ redo: * Skip leading spaces */ p = state->ptr; - fr_skip_spaces(p); + fr_skip_whitespace(p); /* * The line is all spaces, OR we've hit a comment. Go @@ -260,7 +260,7 @@ static int skip_spaces(rlm_isc_dhcp_tokenizer_t *state, char *p) state->ptr = p; char *start = p; - fr_skip_spaces(state->ptr); + fr_skip_whitespace(state->ptr); /* * If we ran out of text on this line, re-fill the @@ -539,7 +539,7 @@ static int match_subword(rlm_isc_dhcp_tokenizer_t *state, char const *cmd, rlm_i char const *next; char type_name[64]; - fr_skip_spaces(cmd); + fr_skip_whitespace(cmd); if (!*cmd) return -1; /* internal error */ diff --git a/src/modules/rlm_mschap/rlm_mschap.c b/src/modules/rlm_mschap/rlm_mschap.c index a2081bc599f..38fdf12686f 100644 --- a/src/modules/rlm_mschap/rlm_mschap.c +++ b/src/modules/rlm_mschap/rlm_mschap.c @@ -560,7 +560,7 @@ static ssize_t mschap_xlat(UNUSED TALLOC_CTX *ctx, char **out, size_t outlen, if ((*p == '\0') || (outlen <= 32)) return 0; - fr_skip_spaces(p); + fr_skip_whitespace(p); if (mschap_nt_password_hash(buffer, p) < 0) { REDEBUG("Failed generating NT-Password"); @@ -583,7 +583,7 @@ static ssize_t mschap_xlat(UNUSED TALLOC_CTX *ctx, char **out, size_t outlen, if ((*p == '\0') || (outlen <= 32)) return 0; - fr_skip_spaces(p); + fr_skip_whitespace(p); smbdes_lmpwdhash(p, buffer); fr_bin2hex(*out, buffer, LM_DIGEST_LENGTH); diff --git a/src/modules/rlm_rest/rest.c b/src/modules/rlm_rest/rest.c index 9f50c1c1e9b..548e8c28554 100644 --- a/src/modules/rlm_rest/rest.c +++ b/src/modules/rlm_rest/rest.c @@ -728,7 +728,7 @@ static int rest_decode_post(UNUSED rlm_rest_t const *instance, UNUSED rlm_rest_s /* * Empty response? */ - fr_skip_spaces(p); + fr_skip_whitespace(p); if (*p == '\0') return 0; while (((q = strchr(p, '=')) != NULL) && (count < REST_BODY_MAX_ATTRS)) { @@ -1213,7 +1213,7 @@ static int rest_decode_json(rlm_rest_t const *instance, rlm_rest_section_t const /* * Empty response? */ - fr_skip_spaces(p); + fr_skip_whitespace(p); if (*p == '\0') return 0; json = json_tokener_parse(p); diff --git a/src/modules/rlm_rest/rlm_rest.c b/src/modules/rlm_rest/rlm_rest.c index d5fc01c6246..6efcde2b7ec 100644 --- a/src/modules/rlm_rest/rlm_rest.c +++ b/src/modules/rlm_rest/rlm_rest.c @@ -374,7 +374,7 @@ static xlat_action_t rest_xlat(TALLOC_CTX *ctx, UNUSED fr_cursor_t *out, /* * Trim whitespace */ - fr_skip_spaces(p); + fr_skip_whitespace(p); handle = rctx->handle = fr_pool_connection_get(t->pool, request); if (!handle) return XLAT_ACTION_FAIL; diff --git a/src/modules/rlm_sql/rlm_sql.c b/src/modules/rlm_sql/rlm_sql.c index 00416159903..9a2bc588d46 100644 --- a/src/modules/rlm_sql/rlm_sql.c +++ b/src/modules/rlm_sql/rlm_sql.c @@ -185,7 +185,7 @@ static ssize_t sql_xlat(UNUSED TALLOC_CTX *ctx, char **out, UNUSED size_t outlen /* * Trim whitespace for the prefix check */ - fr_skip_spaces(p); + fr_skip_whitespace(p); /* * If the query starts with any of the following prefixes, diff --git a/src/modules/rlm_unpack/rlm_unpack.c b/src/modules/rlm_unpack/rlm_unpack.c index 4e14fe97601..9dbb2279b6a 100644 --- a/src/modules/rlm_unpack/rlm_unpack.c +++ b/src/modules/rlm_unpack/rlm_unpack.c @@ -73,7 +73,7 @@ static ssize_t unpack_xlat(UNUSED TALLOC_CTX *ctx, char **out, size_t outlen, strlcpy(buffer, fmt, sizeof(buffer)); p = buffer; - fr_skip_spaces(p); /* skip leading spaces */ + fr_skip_whitespace(p); /* skip leading spaces */ data_name = p;