debug: rename assert() to xassert(), to avoid clashing with <assert.h>

This commit is contained in:
Craig Barnes 2021-01-16 20:16:00 +00:00
parent 22f25a9e4f
commit e56136ce11
31 changed files with 387 additions and 388 deletions

4
log.c
View file

@ -94,11 +94,11 @@ _sys_log(enum log_class log_class, const char *module,
case LOG_CLASS_DEBUG: level = LOG_DEBUG; break;
}
assert(level != -1);
xassert(level != -1);
char msg[4096];
int n = vsnprintf(msg, sizeof(msg), fmt, va);
assert(n >= 0);
xassert(n >= 0);
if (sys_errno != 0 && (size_t)n < sizeof(msg))
snprintf(msg + n, sizeof(msg) - n, ": %s", strerror(sys_errno));