summaryrefslogtreecommitdiffstats
path: root/src/basic/psi-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/psi-util.c')
-rw-r--r--src/basic/psi-util.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/basic/psi-util.c b/src/basic/psi-util.c
index af8e278bd0..2a43b03d97 100644
--- a/src/basic/psi-util.c
+++ b/src/basic/psi-util.c
@@ -118,12 +118,10 @@ int is_pressure_supported(void) {
FOREACH_STRING(p, "/proc/pressure/cpu", "/proc/pressure/io", "/proc/pressure/memory") {
r = read_virtual_file(p, 0, NULL, NULL);
- if (r < 0) {
- if (r == -ENOENT || ERRNO_IS_NOT_SUPPORTED(r))
- return (cached = false);
-
+ if (r == -ENOENT || ERRNO_IS_NEG_NOT_SUPPORTED(r))
+ return (cached = false);
+ if (r < 0)
return r;
- }
}
return (cached = true);