Files
git/builtin
Junio C Hamano eee227ad8e builtin/mv.c: use the MOVE_ARRAY() macro instead of memmove()
The variables 'source', 'destination', and 'submodule_gitfile' are
all of type "const char **", and an element of such an array is of
"type const char *", but these memmove() calls were written as if
these variables are of type "char **".

Once these memmove() calls are fixed to use the correct type to
compute the number of bytes to be moved, e.g.

-      memmove(source + i, source + i + 1, n * sizeof(char *));
+      memmove(source + i, source + i + 1, n * sizeof(const char *));

existing contrib/coccinelle/array.cocci rules can recognize them as
candidates for turning into MOVE_ARRAY().

While at it, use CALLOC_ARRAY() instead of xcalloc() to allocate the
modes[] array that is involved in the change.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-07-09 18:38:57 -07:00
..
2022-01-27 18:00:15 -08:00
2022-02-25 15:47:36 -08:00
2022-02-25 15:47:35 -08:00
2022-02-17 16:25:05 -08:00
2022-04-30 22:22:12 -07:00
2021-10-28 09:57:09 -07:00
2021-02-25 16:43:30 -08:00
2022-04-04 10:56:23 -07:00
2022-04-04 10:56:23 -07:00
2022-03-13 22:23:16 +00:00
2022-03-09 13:38:24 -08:00
2022-04-06 15:21:59 -07:00
2021-04-14 13:47:21 -07:00
2022-01-03 16:24:15 -08:00
2022-02-25 15:47:35 -08:00
2022-03-28 15:45:46 -07:00
2022-03-21 15:14:24 -07:00
2022-01-10 11:52:56 -08:00
2022-03-30 18:01:10 -07:00
2021-11-03 13:25:36 -07:00