summaryrefslogtreecommitdiff
path: root/coccinelle/synthetic-errno.cocci
Commit message (Collapse)AuthorAgeFilesLines
* licensing: add spdx to our .cocci filesZbigniew Jędrzejewski-Szmek2021-10-011-0/+1
| | | | | Since those are chunks of code based on our codebase, it's easiest to use the same license.
* coccinelle: ignore specific cases to use SYNTHETIC_ERRNO() macroYu Watanabe2020-11-271-0/+6
|
* coccinelle: add rules for log_unit_error_errno() or friendsYu Watanabe2020-11-271-0/+208
|
* coccinelle: always use SYNTHETIC_ERRNO() macroYu Watanabe2020-11-201-2/+2
|
* coccinelle: further restrict certain transformationsFrantisek Sumsal2019-04-301-0/+6
| | | | | | | | | 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.
* coccinelle: also mark previous synthetic errnos as suchZbigniew Jędrzejewski-Szmek2018-11-221-0/+7
|
* coccinelle: make use of SYNTHETIC_ERRNOZbigniew Jędrzejewski-Szmek2018-11-221-0/+35
Ideally, coccinelle would strip unnecessary braces too. But I do not see any option in coccinelle for this, so instead, I edited the patch text using search&replace to remove the braces. Unfortunately this is not fully automatic, in particular it didn't deal well with if-else-if-else blocks and ifdefs, so there is an increased likelikehood be some bugs in such spots. I also removed part of the patch that coccinelle generated for udev, where we returns -1 for failure. This should be fixed independently.