tree-wide: use cocinnelle to apply _NEG_ macros

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2023-08-16 12:52:56 +02:00
parent b0be985cdd
commit 13d84288bc
13 changed files with 66 additions and 23 deletions
+2 -2
View File
@@ -39,7 +39,7 @@ static void test_last_cap_file(void) {
int r;
r = read_one_line_file("/proc/sys/kernel/cap_last_cap", &content);
if (r == -ENOENT || (r < 0 && ERRNO_IS_PRIVILEGE(r))) /* kernel pre 3.2 or no access */
if (r == -ENOENT || ERRNO_IS_NEG_PRIVILEGE(r)) /* kernel pre 3.2 or no access */
return;
assert_se(r >= 0);
@@ -235,7 +235,7 @@ static void test_ensure_cap_64_bit(void) {
int r;
r = read_one_line_file("/proc/sys/kernel/cap_last_cap", &content);
if (r == -ENOENT || (r < 0 && ERRNO_IS_PRIVILEGE(r))) /* kernel pre 3.2 or no access */
if (r == -ENOENT || ERRNO_IS_NEG_PRIVILEGE(r)) /* kernel pre 3.2 or no access */
return;
assert_se(r >= 0);