tree-wide: introduce strerror_safe()

This commit is contained in:
Yu Watanabe
2019-07-05 02:43:56 +09:00
parent 7fa6223f67
commit 4bbccb02ea
20 changed files with 55 additions and 38 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ int path_spec_watch(PathSpec *s, sd_event_io_handler_t handler) {
break;
}
r = log_warning_errno(errno, "Failed to add watch on %s: %s", s->path, errno == ENOSPC ? "too many watches" : strerror(-r));
r = log_warning_errno(errno, "Failed to add watch on %s: %s", s->path, errno == ENOSPC ? "too many watches" : strerror_safe(r));
if (cut)
*cut = tmp;
goto fail;