summaryrefslogtreecommitdiffstats
path: root/tests/bfstd.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-10-05 12:56:36 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-10-05 13:22:57 -0400
commit428cf9c206beee3407ea3c5480b00f4cfbea95f5 (patch)
treeb5abbb4ad7fc8ee450ea0abfdb7419ca89b8a8ca /tests/bfstd.c
parent634359bb169311646f6369b21f0c90a9819fe2ce (diff)
downloadbfs-428cf9c206beee3407ea3c5480b00f4cfbea95f5.tar.xz
bfstd: Add a thread-safe wrapper for strerror()
Diffstat (limited to 'tests/bfstd.c')
-rw-r--r--tests/bfstd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/bfstd.c b/tests/bfstd.c
index 33b3792..c386279 100644
--- a/tests/bfstd.c
+++ b/tests/bfstd.c
@@ -15,12 +15,12 @@
/** Check the result of xdirname()/xbasename(). */
static void check_base_dir(const char *path, const char *dir, const char *base) {
char *xdir = xdirname(path);
- bfs_verify(xdir, "xdirname(): %s", strerror(errno));
+ bfs_verify(xdir, "xdirname(): %s", xstrerror(errno));
bfs_verify(strcmp(xdir, dir) == 0, "xdirname('%s') == '%s' (!= '%s')", path, xdir, dir);
free(xdir);
char *xbase = xbasename(path);
- bfs_verify(xbase, "xbasename(): %s", strerror(errno));
+ bfs_verify(xbase, "xbasename(): %s", xstrerror(errno));
bfs_verify(strcmp(xbase, base) == 0, "xbasename('%s') == '%s' (!= '%s')", path, xbase, base);
free(xbase);
}