diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2019-04-29 16:12:41 +0200 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2019-04-30 09:39:13 +0200 |
commit | ccd52940d06fc6ba06f44f7ea64f056529c0beb0 (patch) | |
tree | a324ee07cab511e52a921b13c564465fe22b4881 /coccinelle/synthetic-errno.cocci | |
parent | 1f7247903751a79caadc7999f1f5c0ed1d08c24d (diff) | |
download | systemd-ccd52940d06fc6ba06f44f7ea64f056529c0beb0.tar.gz |
coccinelle: further restrict certain transformations
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.
Diffstat (limited to 'coccinelle/synthetic-errno.cocci')
-rw-r--r-- | coccinelle/synthetic-errno.cocci | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/coccinelle/synthetic-errno.cocci b/coccinelle/synthetic-errno.cocci index 645bfc945f..3ddb69cb4c 100644 --- a/coccinelle/synthetic-errno.cocci +++ b/coccinelle/synthetic-errno.cocci @@ -2,9 +2,15 @@ expression e; expression list args; @@ +( +/* Ignore one specific case in src/shared/bootspec.c where we want to stick + * with the log_debug() + return pattern */ +log_debug("Found no default boot entry :("); +| - log_debug(args); - return -e; + return log_debug_errno(SYNTHETIC_ERRNO(e), args); +) @@ expression e; expression list args; |