diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-02-16 01:55:44 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-16 01:55:44 +0300 |
commit | ab66fc2705b35833582d74a8cd90ac0cf7586f89 (patch) | |
tree | bd62d17845c5da6397f1849a1cb4fa7a38fb667d /contrib/coccinelle/strbuf.cocci | |
parent | 090dbea6843f860de8c981d97d031621176fc2be (diff) | |
parent | ae239fc8e57a5758e9db63c0bceaca933d217f81 (diff) |
Merge branch 'rs/cocci-strbuf-addf-to-addstr'
* rs/cocci-strbuf-addf-to-addstr:
cocci: simplify check for trivial format strings
Diffstat (limited to 'contrib/coccinelle/strbuf.cocci')
-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 6fe8727421..e34eada1ad 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 |