On Mon, Jan 22, 2018 at 03:26:59PM -0800, Junio C Hamano wrote:
> Jeff King writes:
>
> > Most of these are "shift part of the array". I wonder if it would make
> > sense to encapsulate that pattern in a helper, like:
> >
> > #define SHIFT_ARRAY(a, nr, pos, slots) \
> > MOVE_ARRAY(a + pos
Jeff King writes:
> Most of these are "shift part of the array". I wonder if it would make
> sense to encapsulate that pattern in a helper, like:
>
> #define SHIFT_ARRAY(a, nr, pos, slots) \
> MOVE_ARRAY(a + pos + slots, a + pos, nr - pos - slots)
> ...
> SHIFT_ARRAY(it->down, it->subtr
On Mon, Jan 22, 2018 at 06:50:09PM +0100, SZEDER Gábor wrote:
> Use the helper macro MOVE_ARRAY to move arrays. This is shorter and
> safer, as it automatically infers the size of elements.
>
> Patch generated by Coccinelle and contrib/coccinelle/array.cocci in
> Travis CI's static analysis buil
Use the helper macro MOVE_ARRAY to move arrays. This is shorter and
safer, as it automatically infers the size of elements.
Patch generated by Coccinelle and contrib/coccinelle/array.cocci in
Travis CI's static analysis build job.
Signed-off-by: SZEDER Gábor
---
cache-tree.c | 5 ++---
co
4 matches
Mail list logo