summaryrefslogtreecommitdiff
path: root/contrib/coccinelle/strbuf.cocci
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/coccinelle/strbuf.cocci')
-rw-r--r--contrib/coccinelle/strbuf.cocci6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/coccinelle/strbuf.cocci b/contrib/coccinelle/strbuf.cocci
index d9ada69..0970d98 100644
--- a/contrib/coccinelle/strbuf.cocci
+++ b/contrib/coccinelle/strbuf.cocci
@@ -15,7 +15,7 @@ constant fmt !~ "%";
@@
expression E;
struct strbuf SB;
-format F =~ "s";
+format F =~ "^s$";
@@
- strbuf_addf(E, "%@F@", SB.buf);
+ strbuf_addbuf(E, &SB);
@@ -23,7 +23,7 @@ format F =~ "s";
@@
expression E;
struct strbuf *SBP;
-format F =~ "s";
+format F =~ "^s$";
@@
- strbuf_addf(E, "%@F@", SBP->buf);
+ strbuf_addbuf(E, SBP);
@@ -44,7 +44,7 @@ struct strbuf *SBP;
@@
expression E1, E2;
-format F =~ "s";
+format F =~ "^s$";
@@
- strbuf_addf(E1, "%@F@", E2);
+ strbuf_addstr(E1, E2);