diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-03-22 14:24:17 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-22 14:24:17 -0700 |
commit | fda2326cb71a0f133286d02ef1dfe8338f7f2249 (patch) | |
tree | eea46dfce3d37ba90fecc4b7aaac2df0160ec4a2 | |
parent | e55521be8d2606b4b513d25459d8b97a0ff8a50e (diff) | |
parent | ae239fc8e57a5758e9db63c0bceaca933d217f81 (diff) | |
download | git-fda2326cb71a0f133286d02ef1dfe8338f7f2249.tar.gz |
Merge branch 'rs/cocci-strbuf-addf-to-addstr' into maint
* rs/cocci-strbuf-addf-to-addstr:
cocci: simplify check for trivial format strings
-rw-r--r-- | contrib/coccinelle/strbuf.cocci | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/contrib/coccinelle/strbuf.cocci b/contrib/coccinelle/strbuf.cocci index 1d580e49b0..ce2e92c6e9 100644 --- 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 |