use COPY_ARRAY
authorRené Scharfe <l.s.r@web.de>
Sun, 25 Sep 2016 07:24:03 +0000 (09:24 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 25 Sep 2016 23:44:13 +0000 (16:44 -0700)
commit45ccef87b3cc0ab09ec5fd1186aa0b33298ee8d4
tree83dffbe2e99b0fd98a286208a655012a86fb292b
parent60566cbb5890abc84fa18c56da70e35ace0b23bf
use COPY_ARRAY

Add a semantic patch for converting certain calls of memcpy(3) to
COPY_ARRAY() and apply that transformation to the code base.  The result
is
 shorter and safer code.  For now only consider calls where source and
destination have the same type, or in other words: easy cases.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/mv.c
commit.c
contrib/coccinelle/array.cocci [new file with mode: 0644]
pack-revindex.c
pathspec.c
split-index.c