Output variables come first
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 2 Oct 2014 13:24:25 +0000 (14:24 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 2 Oct 2014 14:20:22 +0000 (15:20 +0100)
src/include/parser.h
src/main/conffile.c
src/main/modcall.c
src/main/parser.c

index 16e5365..c9eea55 100644 (file)
@@ -103,7 +103,7 @@ size_t fr_cond_sprint(char *buffer, size_t bufsize, fr_cond_t const *c);
 
 bool fr_condition_walk(fr_cond_t *head, bool (*callback)(void *, fr_cond_t *), void *ctx);
 
-void fr_canonicalize_error(TALLOC_CTX *ctx, ssize_t slen, char **spaces, char **text, char const *msg);
+void fr_canonicalize_error(char **spaces, char **text, TALLOC_CTX *ctx, ssize_t slen, char const *msg);
 
 /*
  *     In xlat.c for now
index f163fea..f4117a2 100644 (file)
@@ -1492,7 +1492,7 @@ int cf_section_parse_pass2(CONF_SECTION *cs, UNUSED void *base,
                if (slen < 0) {
                        char *spaces, *text;
 
-                       fr_canonicalize_error(cs, slen, &spaces, &text, cp->value);
+                       fr_canonicalize_error(&spaces, &text, cs, slen, cp->value);
 
                        cf_log_err(&cp->item, "Failed parsing expanded string:");
                        cf_log_err(&cp->item, "%s", text);
@@ -2102,7 +2102,7 @@ static int cf_section_read(char const *filename, int *lineno, FILE *fp,
                        if (slen < 0) {
                                char *spaces, *text;
 
-                               fr_canonicalize_error(nextcs, slen, &spaces, &text, ptr);
+                               fr_canonicalize_error(&spaces, &text, nextcs, slen, ptr);
 
                                ERROR("%s[%d]: Parse error in condition",
                                      filename, *lineno);
index 239b764..a7006c3 100644 (file)
@@ -2798,7 +2798,7 @@ static bool pass2_xlat_compile(CONF_ITEM const *ci, value_pair_tmpl_t **pvpt, bo
        if (slen < 0) {
                char *spaces, *text;
 
-               fr_canonicalize_error(vpt, slen, &spaces, &text, vpt->name);
+               fr_canonicalize_error(&spaces, &text, vpt, slen, vpt->name);
 
                cf_log_err(ci, "Failed parsing expanded string:");
                cf_log_err(ci, "%s", text);
index 8cede8f..004b2fa 100644 (file)
@@ -1508,7 +1508,7 @@ bool fr_condition_walk(fr_cond_t *c, bool (*callback)(void *, fr_cond_t *), void
        return true;
 }
 
-void fr_canonicalize_error(TALLOC_CTX *ctx, ssize_t slen, char **spaces, char **text, char const *msg)
+void fr_canonicalize_error(char **spaces, char **text, TALLOC_CTX *ctx, ssize_t slen, char const *msg)
 {
        size_t offset, skip = 0;
        char *spbuf, *p;