summaryrefslogtreecommitdiffstats
path: root/tests/xtouch.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/xtouch.c
parent634359bb169311646f6369b21f0c90a9819fe2ce (diff)
downloadbfs-428cf9c206beee3407ea3c5480b00f4cfbea95f5.tar.xz
bfstd: Add a thread-safe wrapper for strerror()
Diffstat (limited to 'tests/xtouch.c')
-rw-r--r--tests/xtouch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/xtouch.c b/tests/xtouch.c
index 80fad8d..a4c4d40 100644
--- a/tests/xtouch.c
+++ b/tests/xtouch.c
@@ -197,14 +197,14 @@ int main(int argc, char *argv[]) {
if (rarg) {
struct stat buf;
if (fstatat(AT_FDCWD, rarg, &buf, at_flags(&args)) != 0) {
- fprintf(stderr, "%s: '%s': %s\n", cmd, rarg, strerror(errno));
+ fprintf(stderr, "%s: '%s': %s\n", cmd, rarg, xstrerror(errno));
return EXIT_FAILURE;
}
times[0] = buf.st_atim;
times[1] = buf.st_mtim;
} else if (darg) {
if (xgetdate(darg, &times[0]) != 0) {
- fprintf(stderr, "%s: Parsing time '%s' failed: %s\n", cmd, darg, strerror(errno));
+ fprintf(stderr, "%s: Parsing time '%s' failed: %s\n", cmd, darg, xstrerror(errno));
return EXIT_FAILURE;
}
times[1] = times[0];
@@ -237,7 +237,7 @@ int main(int argc, char *argv[]) {
for (; optind < argc; ++optind) {
const char *path = argv[optind];
if (xtouch(&args, path) != 0) {
- fprintf(stderr, "%s: '%s': %s\n", cmd, path, strerror(errno));
+ fprintf(stderr, "%s: '%s': %s\n", cmd, path, xstrerror(errno));
ret = EXIT_FAILURE;
}
}