summaryrefslogtreecommitdiffstats
path: root/coccinelle/flags-set.cocci (follow)
Commit message (Collapse)AuthorAgeFilesLines
* coccinelle: filter out a couple of 'false-positive' transformationsFrantisek Sumsal2021-03-181-1/+2
| | | | | | | | | | * flag-set.cocci: perform the transformation only if the second argument is a constant * sd-journal/lookup3.c: skip the cocci completely for this file, since it's not "ours" * strjoina.cocci: skip the transformation on the "test_strjoina" test, since it intentionally tests the "incorrect" expression we're trying to transform (the same thing was already done in strjoin.cocci)
* coccinelle: disable flags-set where it doesn't make senseFrantisek Sumsal2020-10-041-3/+9
|
* coccinelle: further restrict certain transformationsFrantisek Sumsal2019-04-301-9/+10
| | | | | | | | | Some transformations generate results we don't want to keep, so let's disable such transformations for specific files. Also, disable const-strlen.cocci everywhere, as the STRLEN macro has a pretty limited scope, so the transformation generates false positives in most cases.
* Add macro for checking if some flags are setZbigniew Jędrzejewski-Szmek2018-06-041-0/+15
This way we don't need to repeat the argument twice. I didn't replace all instances. I think it's better to leave out: - asserts - comparisons like x & y == x, which are mathematically equivalent, but here we aren't checking if flags are set, but if the argument fits in the flags.