various: use _NEG_ macros to reduce indentation

No functional change intended.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2023-08-16 12:52:56 +02:00
parent 1f2db2e315
commit bb44fd0734
23 changed files with 188 additions and 255 deletions
+3 -5
View File
@@ -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);