diff options
author | Andreas Rammhold <andreas@rammhold.de> | 2017-09-29 00:37:23 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-09-29 00:37:23 +0200 |
commit | a4488a7509a96d8b9f0d7793517a217c70ac0361 (patch) | |
tree | b7e4afb30d283f580ba35d37290bcf22a124a091 /coccinelle | |
parent | 471b87cc6c159bafd11023e009fc43aa73812b5f (diff) |
tree-wide: use IN_SET where possible
In addition to the changes from #6933 this handles cases that could be
matched with the included cocci file.
Diffstat (limited to 'coccinelle')
-rw-r--r-- | coccinelle/in_set.cocci | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/coccinelle/in_set.cocci b/coccinelle/in_set.cocci new file mode 100644 index 000000000..f5ddd3d33 --- /dev/null +++ b/coccinelle/in_set.cocci @@ -0,0 +1,35 @@ +@@ +expression e; +identifier n1, n2, n3, n4, n5, n6; +statement s; +@@ +- e == n1 || e == n2 || e == n3 || e == n4 || e == n5 || e == n6 ++ IN_SET(e, n1, n2, n3, n4, n5, n6) +@@ +expression e; +identifier n1, n2, n3, n4, n5; +statement s; +@@ +- e == n1 || e == n2 || e == n3 || e == n4 || e == n5 ++ IN_SET(e, n1, n2, n3, n4, n5) +@@ +expression e; +identifier n1, n2, n3, n4; +statement s; +@@ +- e == n1 || e == n2 || e == n3 || e == n4 ++ IN_SET(e, n1, n2, n3, n4) +@@ +expression e; +identifier n1, n2, n3; +statement s; +@@ +- e == n1 || e == n2 || e == n3 ++ IN_SET(e, n1, n2, n3) +@@ +expression e; +identifier n, p; +statement s; +@@ +- e == n || e == p ++ IN_SET(e, n, p) |