summaryrefslogtreecommitdiffstats
path: root/src/color.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-05-18 16:44:30 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-05-18 16:46:13 -0400
commit526133c11eb9a26a4cffb20bcd10bcbb36d940de (patch)
tree26787e3cc22df2c44837f72f6ff919ab7808a8f6 /src/color.c
parent63a52b1bfc99c58f0a944174282da79aab5bde3a (diff)
downloadbfs-526133c11eb9a26a4cffb20bcd10bcbb36d940de.tar.xz
Switch from assert() to bfs_assert()/bfs_verify()
Diffstat (limited to 'src/color.c')
-rw-r--r--src/color.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/color.c b/src/color.c
index 43ea9a4..a723084 100644
--- a/src/color.c
+++ b/src/color.c
@@ -12,7 +12,6 @@
#include "fsade.h"
#include "stat.h"
#include "trie.h"
-#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
@@ -699,7 +698,7 @@ static int print_colored(CFILE *cfile, const char *esc, const char *str, size_t
/** Find the offset of the first broken path component. */
static ssize_t first_broken_offset(const char *path, const struct BFTW *ftwbuf, enum bfs_stat_flags flags, size_t max) {
ssize_t ret = max;
- assert(ret >= 0);
+ bfs_assert(ret >= 0);
if (bftw_type(ftwbuf, flags) != BFS_ERROR) {
goto out;
@@ -1100,7 +1099,7 @@ static int cbuff(CFILE *cfile, const char *format, ...) {
}
int cvfprintf(CFILE *cfile, const char *format, va_list args) {
- assert(dstrlen(cfile->buffer) == 0);
+ bfs_assert(dstrlen(cfile->buffer) == 0);
int ret = -1;
if (cvbuff(cfile, format, args) == 0) {