Frantisek Sumsal
a0aca8821c
coccinelle: don't try to use IN_SET() in assert_cc()
...
Since assert_cc() requires an integral constant expression.
2022-05-30 18:17:11 +02:00
Zbigniew Jędrzejewski-Szmek
64b92d637c
licensing: add spdx to our .cocci files
...
Since those are chunks of code based on our codebase, it's easiest to use the
same license.
2021-10-01 14:45:00 +02:00
Frantisek Sumsal
1813613fed
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.
2020-10-04 12:32:21 +02:00
Frantisek Sumsal
1f72479037
coccinelle: exclude JsonVariant* from the IN_SET transformation
...
JsonVariant* doesn't work with the current IN_SET implementation, so
let's exclude it from the transformation altogether
2019-04-30 09:39:13 +02:00
Lennart Poettering
a2d61f0746
coccinelle: fix IN_SET/!IN_SET scripts, and apply some changes it found
...
IN_SET only works for constant values, hence clarify that. Moreover, we
declared a statement "s" we never made use of. Drop it.
Also, for both scripts, let's support 10 items. More causes spatch to
die with "Stack overflow" for me.
2017-11-29 20:12:26 +01:00
Andreas Rammhold
3742095b27
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.
2017-10-02 13:09:54 +02:00