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/const-strlen.disabled | |
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/const-strlen.disabled')
-rw-r--r-- | coccinelle/const-strlen.disabled | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/coccinelle/const-strlen.disabled b/coccinelle/const-strlen.disabled new file mode 100644 index 0000000000..30a6e5a88e --- /dev/null +++ b/coccinelle/const-strlen.disabled @@ -0,0 +1,14 @@ +@@ +constant s; +@@ +( +#define STRLEN +& +- sizeof(s)-1 ++ STRLEN(s) +) +@@ +constant s; +@@ +- strlen(s) ++ STRLEN(s) |