Merge branch 'rs/cocci-strbuf-addf-to-addstr'
* rs/cocci-strbuf-addf-to-addstr: cocci: simplify check for trivial format strings
This commit is contained in:
commit
ab66fc2705
@ -1,21 +1,6 @@
|
|||||||
@ strbuf_addf_with_format_only @
|
@ strbuf_addf_with_format_only @
|
||||||
expression E;
|
expression E;
|
||||||
constant fmt;
|
constant fmt !~ "%";
|
||||||
@@
|
|
||||||
strbuf_addf(E,
|
|
||||||
(
|
|
||||||
fmt
|
|
||||||
|
|
|
||||||
_(fmt)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
@ script:python @
|
|
||||||
fmt << strbuf_addf_with_format_only.fmt;
|
|
||||||
@@
|
|
||||||
cocci.include_match("%" not in fmt)
|
|
||||||
|
|
||||||
@ extends strbuf_addf_with_format_only @
|
|
||||||
@@
|
@@
|
||||||
- strbuf_addf
|
- strbuf_addf
|
||||||
+ strbuf_addstr
|
+ strbuf_addstr
|
||||||
|
Loading…
Reference in New Issue
Block a user