mirror of
https://github.com/systemd/systemd
synced 2024-11-05 18:25:39 +00:00
ccd52940d0
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.
42 lines
627 B
Text
42 lines
627 B
Text
@@
|
|
/* Disable this transformation for the test-string-util.c */
|
|
position p : script:python() { p[0].file != "src/test/test-string-util.c" };
|
|
expression s;
|
|
@@
|
|
(
|
|
- strv_length@p(s) == 0
|
|
+ strv_isempty(s)
|
|
|
|
|
- strv_length@p(s) <= 0
|
|
+ strv_isempty(s)
|
|
|
|
|
- strv_length@p(s) > 0
|
|
+ !strv_isempty(s)
|
|
|
|
|
- strv_length@p(s) != 0
|
|
+ !strv_isempty(s)
|
|
|
|
|
- strlen@p(s) == 0
|
|
+ isempty(s)
|
|
|
|
|
- strlen@p(s) <= 0
|
|
+ isempty(s)
|
|
|
|
|
- strlen@p(s) > 0
|
|
+ !isempty(s)
|
|
|
|
|
- strlen@p(s) != 0
|
|
+ !isempty(s)
|
|
|
|
|
- strlen_ptr@p(s) == 0
|
|
+ isempty(s)
|
|
|
|
|
- strlen_ptr@p(s) <= 0
|
|
+ isempty(s)
|
|
|
|
|
- strlen_ptr@p(s) > 0
|
|
+ !isempty(s)
|
|
|
|
|
- strlen_ptr@p(s) != 0
|
|
+ !isempty(s)
|
|
)
|