diff options
| author | Craig Barnes <craigbarnes@protonmail.com> | 2021-01-16 20:16:00 +0000 |
|---|---|---|
| committer | Craig Barnes <craigbarnes@protonmail.com> | 2021-01-16 20:16:00 +0000 |
| commit | e56136ce1192d04a52b01ccb41284f0b7896430e (patch) | |
| tree | 10948eb4aface28e80d6a075fecf11fad3075618 /xsnprintf.c | |
| parent | Print stack trace on assert() failure or when calling fatal_error() (diff) | |
debug: rename assert() to xassert(), to avoid clashing with <assert.h>
Diffstat (limited to 'xsnprintf.c')
| -rw-r--r-- | xsnprintf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xsnprintf.c b/xsnprintf.c index 9e7693b6..b0e17741 100644 --- a/xsnprintf.c +++ b/xsnprintf.c @@ -7,7 +7,7 @@ size_t xvsnprintf(char *buf, size_t n, const char *format, va_list ap) { - assert(n <= INT_MAX); + xassert(n <= INT_MAX); int len = vsnprintf(buf, n, format, ap); /* @@ -19,8 +19,8 @@ xvsnprintf(char *buf, size_t n, const char *format, va_list ap) * has been completely written if and only if the returned value * is nonnegative and less than n." */ - assert(len >= 0); - assert(len < (int)n); + xassert(len >= 0); + xassert(len < (int)n); return (size_t)len; } |
