From 5920a1b5e19e529ab3a3972348a6d53bcd90acfc Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 2 Dec 2020 10:26:09 -0500 Subject: Give messages to unconditional assertion failures --- stat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stat.c') diff --git a/stat.c b/stat.c index fbbb002..7fb6b50 100644 --- a/stat.c +++ b/stat.c @@ -75,7 +75,7 @@ const char *bfs_stat_field_name(enum bfs_stat_field field) { return "modification time"; } - assert(false); + assert(!"Unrecognized stat field"); return "???"; } @@ -349,7 +349,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(false); + assert(!"Invalid stat field for time"); errno = EINVAL; return NULL; } -- cgit v1.2.3