diff options
Diffstat (limited to 'src/util.c')
| -rw-r--r-- | src/util.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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); |