summaryrefslogtreecommitdiffstats
path: root/src/dstring.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-05-18 13:27:04 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-05-18 16:30:25 -0400
commit88581b9d505342e20d03cc4c6557d30c3f66f0f5 (patch)
tree1b777eee727acd3ca620c6287352e8e29e72045c /src/dstring.c
parentded8567215afa498295660d123159f26210e066a (diff)
downloadbfs-88581b9d505342e20d03cc4c6557d30c3f66f0f5.tar.xz
Use bfs_bug("...") over assert(!"...")
Diffstat (limited to 'src/dstring.c')
-rw-r--r--src/dstring.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dstring.c b/src/dstring.c
index 05efb10..2c9869d 100644
--- a/src/dstring.c
+++ b/src/dstring.c
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: 0BSD
#include "dstring.h"
-#include <assert.h>
+#include "diag.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
@@ -184,7 +184,7 @@ int dstrvcatf(char **str, const char *format, va_list args) {
tail = *str + len;
ret = vsnprintf(tail, tail_len + 1, format, copy);
if (ret < 0 || (size_t)ret != tail_len) {
- assert(!"Length of formatted string changed");
+ bfs_bug("Length of formatted string changed");
goto fail;
}
}