mirror of
https://github.com/systemd/systemd.git
synced 2024-12-28 11:21:59 +03: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.
43 lines
627 B
Plaintext
43 lines
627 B
Plaintext
@@
|
|
/* 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)
|
|
)
|