зеркало из https://github.com/microsoft/git.git
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
This commit is contained in:
Коммит
5db562704c
|
@ -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";
|
||||
|
|
Загрузка…
Ссылка в новой задаче