mirror of
https://github.com/git/git.git
synced 2024-11-01 06:47:52 +01:00
76d8d45ffb
There are two rules for using FREE_AND_NULL in free.cocci, one for pointer types and one for expressions. Both cause coccinelle to remove empty lines and even newline characters between replacements for some reason; consecutive "free(x);/x=NULL;" sequences end up as multiple FREE_AND_NULL calls on the same time. Remove the type rule, as the expression rule already covers it, and rearrange the lines of the latter to place the addition of FREE_AND_NULL between the removals, which causes coccinelle to leave surrounding whitespace untouched. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> |
||
---|---|---|
.. | ||
.gitignore | ||
array.cocci | ||
free.cocci | ||
object_id.cocci | ||
qsort.cocci | ||
README | ||
strbuf.cocci | ||
swap.cocci | ||
xstrdup_or_null.cocci |
This directory provides examples of Coccinelle (http://coccinelle.lip6.fr/) semantic patches that might be useful to developers.