summaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index a2c6c18..ea36991 100644
--- a/src/util.c
+++ b/src/util.c
@@ -71,6 +71,12 @@ cepis_status_t cepis_set_error(cepis_error_t *err, cepis_status_t status,
err->status = status;
err->http_status = http_status;
err->retry_after = retry_after;
+ /*
+ * Cleared here, not by the caller: an error is declared uninitialised
+ * on the stack and reused across calls, so anything left set would be
+ * read as a municipality that this failure never named.
+ */
+ err->has_faixa = false;
va_start(args, fmt);
vsnprintf(err->message, sizeof(err->message), fmt, args);
va_end(args);