diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2023-05-18 13:27:04 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2023-05-18 16:30:25 -0400 |
commit | 88581b9d505342e20d03cc4c6557d30c3f66f0f5 (patch) | |
tree | 1b777eee727acd3ca620c6287352e8e29e72045c /src/stat.c | |
parent | ded8567215afa498295660d123159f26210e066a (diff) | |
download | bfs-88581b9d505342e20d03cc4c6557d30c3f66f0f5.tar.xz |
Use bfs_bug("...") over assert(!"...")
Diffstat (limited to 'src/stat.c')
-rw-r--r-- | src/stat.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -4,7 +4,7 @@ #include "stat.h" #include "bfstd.h" #include "config.h" -#include <assert.h> +#include "diag.h" #include <errno.h> #include <fcntl.h> #include <string.h> @@ -57,7 +57,7 @@ const char *bfs_stat_field_name(enum bfs_stat_field field) { return "modification time"; } - assert(!"Unrecognized stat field"); + bfs_bug("Unrecognized stat field"); return "???"; } @@ -340,7 +340,7 @@ const struct timespec *bfs_stat_time(const struct bfs_stat *buf, enum bfs_stat_f case BFS_STAT_MTIME: return &buf->mtime; default: - assert(!"Invalid stat field for time"); + bfs_bug("Invalid stat field for time"); errno = EINVAL; return NULL; } |