Skip to content
Snippets Groups Projects
Commit 5db56270 authored by Junio C Hamano's avatar Junio C Hamano
Browse files

Merge branch 'sg/strbuf-addbuf-cocci'

Cocci rule update.

* sg/strbuf-addbuf-cocci:
  strbuf.cocci: suggest strbuf_addbuf() to add one strbuf to an other
parents abf39e33 28c23cd4
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -12,6 +12,36 @@ constant fmt !~ "%";
)
);
 
@@
expression E;
struct strbuf SB;
format F =~ "s";
@@
- strbuf_addf(E, "%@F@", SB.buf);
+ strbuf_addbuf(E, &SB);
@@
expression E;
struct strbuf *SBP;
format F =~ "s";
@@
- strbuf_addf(E, "%@F@", SBP->buf);
+ strbuf_addbuf(E, SBP);
@@
expression E;
struct strbuf SB;
@@
- strbuf_addstr(E, SB.buf);
+ strbuf_addbuf(E, &SB);
@@
expression E;
struct strbuf *SBP;
@@
- strbuf_addstr(E, SBP->buf);
+ strbuf_addbuf(E, SBP);
@@
expression E1, E2;
format F =~ "s";
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment