mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
debug: rename assert() to xassert(), to avoid clashing with <assert.h>
This commit is contained in:
parent
22f25a9e4f
commit
e56136ce11
31 changed files with 387 additions and 388 deletions
4
log.c
4
log.c
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue