Merge branch 'rs/strbuf-cocci-workaround'
Update Coccinelle rules to catch and optimize strbuf_addf(&buf, "%s", str) * rs/strbuf-cocci-workaround: cocci: use format keyword instead of a literal string
This commit is contained in:
commit
73df1b3421
@ -29,8 +29,9 @@ cocci.include_match("%" not in fmt)
|
||||
|
||||
@@
|
||||
expression E1, E2;
|
||||
format F =~ "s";
|
||||
@@
|
||||
- strbuf_addf(E1, "%s", E2);
|
||||
- strbuf_addf(E1, "%@F@", E2);
|
||||
+ strbuf_addstr(E1, E2);
|
||||
|
||||
@@
|
||||
|
Loading…
Reference in New Issue
Block a user