mirror of
https://github.com/systemd/systemd.git
synced 2025-01-09 01:18:19 +03:00
coccinelle: limit the # of expressions in in_set/not_in_set
transformations. Otherwise the time and resources to generate all possible permutations is simply unreasonable for running on local machines.
This commit is contained in:
parent
cb60571b31
commit
1813613fed
@ -1,25 +1,13 @@
|
||||
/* Limit the number of expressions to 6 for performance reasons */
|
||||
@@
|
||||
expression e;
|
||||
/* Exclude JsonVariant * from the transformation, as it can't work with the
|
||||
* current version of the IN_SET macro */
|
||||
typedef JsonVariant;
|
||||
type T != JsonVariant*;
|
||||
constant T n0, n1, n2, n3, n4, n5, n6, n7, n8, n9;
|
||||
constant T n0, n1, n2, n3, n4, n5;
|
||||
@@
|
||||
|
||||
(
|
||||
- e == n0 || e == n1 || e == n2 || e == n3 || e == n4 || e == n5 || e == n6 || e == n7 || e == n8 || e == n9
|
||||
+ IN_SET(e, n0, n1, n2, n3, n4, n5, n6, n7, n8, n9)
|
||||
|
|
||||
- e == n0 || e == n1 || e == n2 || e == n3 || e == n4 || e == n5 || e == n6 || e == n7 || e == n8
|
||||
+ IN_SET(e, n0, n1, n2, n3, n4, n5, n6, n7, n8)
|
||||
|
|
||||
- e == n0 || e == n1 || e == n2 || e == n3 || e == n4 || e == n5 || e == n6 || e == n7
|
||||
+ IN_SET(e, n0, n1, n2, n3, n4, n5, n6, n7)
|
||||
|
|
||||
- e == n0 || e == n1 || e == n2 || e == n3 || e == n4 || e == n5 || e == n6
|
||||
+ IN_SET(e, n0, n1, n2, n3, n4, n5, n6)
|
||||
|
|
||||
- e == n0 || e == n1 || e == n2 || e == n3 || e == n4 || e == n5
|
||||
+ IN_SET(e, n0, n1, n2, n3, n4, n5)
|
||||
|
|
||||
|
@ -1,22 +1,11 @@
|
||||
/* Limit the number of expressions to 6 for performance reasons */
|
||||
@@
|
||||
expression e;
|
||||
typedef JsonVariant;
|
||||
type T != JsonVariant*;
|
||||
constant T n0, n1, n2, n3, n4, n5, n6, n7, n8, n9;
|
||||
constant T n0, n1, n2, n3, n4, n5;
|
||||
@@
|
||||
(
|
||||
- e != n0 && e != n1 && e != n2 && e != n3 && e != n4 && e != n5 && e != n6 && e != n7 && e != n8 && e != n9
|
||||
+ !IN_SET(e, n0, n1, n2, n3, n4, n5, n6, n7, n8, n9)
|
||||
|
|
||||
- e != n0 && e != n1 && e != n2 && e != n3 && e != n4 && e != n5 && e != n6 && e != n7 && e != n8
|
||||
+ !IN_SET(e, n0, n1, n2, n3, n4, n5, n6, n7, n8)
|
||||
|
|
||||
- e != n0 && e != n1 && e != n2 && e != n3 && e != n4 && e != n5 && e != n6 && e != n7
|
||||
+ !IN_SET(e, n0, n1, n2, n3, n4, n5, n6, n7)
|
||||
|
|
||||
- e != n0 && e != n1 && e != n2 && e != n3 && e != n4 && e != n5 && e != n6
|
||||
+ !IN_SET(e, n0, n1, n2, n3, n4, n5, n6)
|
||||
|
|
||||
- e != n0 && e != n1 && e != n2 && e != n3 && e != n4 && e != n5
|
||||
+ !IN_SET(e, n0, n1, n2, n3, n4, n5)
|
||||
|
|
||||
|
Loading…
Reference in New Issue
Block a user