Skip to content

Commit fda2326

Browse files
committed
Merge branch 'rs/cocci-strbuf-addf-to-addstr' into maint
* rs/cocci-strbuf-addf-to-addstr: cocci: simplify check for trivial format strings
2 parents e55521b + ae239fc commit fda2326

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

contrib/coccinelle/strbuf.cocci

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
@ strbuf_addf_with_format_only @
22
expression E;
3-
constant fmt;
4-
@@
5-
strbuf_addf(E,
6-
(
7-
fmt
8-
|
9-
_(fmt)
10-
)
11-
);
12-
13-
@ script:python @
14-
fmt << strbuf_addf_with_format_only.fmt;
15-
@@
16-
cocci.include_match("%" not in fmt)
17-
18-
@ extends strbuf_addf_with_format_only @
3+
constant fmt !~ "%";
194
@@
205
- strbuf_addf
216
+ strbuf_addstr

0 commit comments

Comments
 (0)