1
0
mirror of https://github.com/git/git.git synced 2024-10-01 17:42:20 +02:00
git/contrib/coccinelle
René Scharfe 578398071e add MOVE_ARRAY
Similar to COPY_ARRAY (introduced in 60566cbb58), add a safe and
convenient helper for moving potentially overlapping ranges of array
entries.  It infers the element size, multiplies automatically and
safely to get the size in bytes, does a basic type safety check by
comparing element sizes and unlike memmove(3) it supports NULL
pointers iff 0 elements are to be moved.

Also add a semantic patch to demonstrate the helper's intended usage.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-17 14:54:53 -07:00
..
.gitignore
array.cocci add MOVE_ARRAY 2017-07-17 14:54:53 -07:00
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.