mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
coccinelle: beef up isempty() checks (#7729)
With these additions, coccinelle finds everything fixed by the first commit in PR #7695. In order not to needlessly conflict with that PR this PR won't include those fixes, but only the coccinelle changes to detect them automatically in the future.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
5526ac50fe
commit
7e985c6983
@@ -6,10 +6,55 @@ expression s;
|
||||
@@
|
||||
expression s;
|
||||
@@
|
||||
- strv_length(s) <= 0
|
||||
+ strv_isempty(s)
|
||||
@@
|
||||
expression s;
|
||||
@@
|
||||
- strv_length(s) > 0
|
||||
+ !strv_isempty(s)
|
||||
@@
|
||||
expression s;
|
||||
@@
|
||||
- strv_length(s) != 0
|
||||
+ !strv_isempty(s)
|
||||
@@
|
||||
expression s;
|
||||
@@
|
||||
- strlen(s) == 0
|
||||
+ isempty(s)
|
||||
@@
|
||||
expression s;
|
||||
@@
|
||||
- strlen(s) <= 0
|
||||
+ isempty(s)
|
||||
@@
|
||||
expression s;
|
||||
@@
|
||||
- strlen(s) > 0
|
||||
+ !isempty(s)
|
||||
@@
|
||||
expression s;
|
||||
@@
|
||||
- strlen(s) != 0
|
||||
+ !isempty(s)
|
||||
@@
|
||||
expression s;
|
||||
@@
|
||||
- strlen_ptr(s) == 0
|
||||
+ isempty(s)
|
||||
@@
|
||||
expression s;
|
||||
@@
|
||||
- strlen_ptr(s) <= 0
|
||||
+ isempty(s)
|
||||
@@
|
||||
expression s;
|
||||
@@
|
||||
- strlen_ptr(s) > 0
|
||||
+ !isempty(s)
|
||||
@@
|
||||
expression s;
|
||||
@@
|
||||
- strlen_ptr(s) != 0
|
||||
+ !isempty(s)
|
||||
|
||||
Reference in New Issue
Block a user