summaryrefslogtreecommitdiff
path: root/coccinelle/flags-set.cocci
diff options
context:
space:
mode:
Diffstat (limited to 'coccinelle/flags-set.cocci')
-rw-r--r--coccinelle/flags-set.cocci19
1 files changed, 10 insertions, 9 deletions
diff --git a/coccinelle/flags-set.cocci b/coccinelle/flags-set.cocci
index 1a70717e76..73966b02e5 100644
--- a/coccinelle/flags-set.cocci
+++ b/coccinelle/flags-set.cocci
@@ -1,15 +1,16 @@
@@
+/* Disable this transformation for the securebits-util.h, as it makes
+ * the expression there confusing. */
+position p : script:python() { p[0].file != "src/shared/securebits-util.h" };
expression x, y;
@@
-- ((x) & (y)) == (y)
+(
+- ((x@p) & (y)) == (y)
+ FLAGS_SET(x, y)
-@@
-expression x, y;
-@@
-- (x & (y)) == (y)
+|
+- (x@p & (y)) == (y)
+ FLAGS_SET(x, y)
-@@
-expression x, y;
-@@
-- ((x) & y) == y
+|
+- ((x@p) & y) == y
+ FLAGS_SET(x, y)
+)