tree-wide: define and use STRERROR_OR_EOF()

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2022-10-11 16:58:21 +02:00
parent a6e016af01
commit f69ae8585f
5 changed files with 18 additions and 7 deletions
+1 -1
View File
@@ -308,7 +308,7 @@ static void* client1(void *p) {
errno = 0;
if (read(pp[0], &x, 1) <= 0) {
log_error("Failed to read from pipe: %s", errno != 0 ? strerror_safe(errno) : "early read");
log_error("Failed to read from pipe: %s", STRERROR_OR_EOF(errno));
goto finish;
}