Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'rs/cocci-strbuf-addf-to-addstr' into next
author
Junio C Hamano
<gitster@pobox.com>
Thu, 8 Feb 2018 23:08:28 +0000
(15:08 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 8 Feb 2018 23:08:28 +0000
(15:08 -0800)
* rs/cocci-strbuf-addf-to-addstr:
cocci: simplify check for trivial format strings
contrib/coccinelle/strbuf.cocci
patch
|
blob
|
history
raw
(from parent 1:
91e362b
)
diff --git
a/contrib/coccinelle/strbuf.cocci
b/contrib/coccinelle/strbuf.cocci
index 6fe8727421101efc04c15d8c6def448984eff74d..e34eada1ad52933230c7fcace595677747f9e1d6 100644
(file)
--- a/
contrib/coccinelle/strbuf.cocci
+++ b/
contrib/coccinelle/strbuf.cocci
@@
-1,21
+1,6
@@
@ strbuf_addf_with_format_only @
expression E;
-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 @
+constant fmt !~ "%";
@@
- strbuf_addf
+ strbuf_addstr