• René Scharfe's avatar
    use MOVE_ARRAY · f331ab9d
    René Scharfe authored
    Simplify the code for moving members inside of an array and make it more
    robust by using the helper macro MOVE_ARRAY.  It calculates the size
    based on the specified number of elements for us and supports NULL
    pointers when that number is zero.  Raw memmove(3) calls with NULL can
    cause the compiler to (over-eagerly) optimize out later NULL checks.
    This patch was generated with contrib/coccinelle/array.cocci and spatch
    Signed-off-by: default avatarRene Scharfe <[email protected]>
    Signed-off-by: default avatarJunio C Hamano <[email protected]>
reflog-walk.c 8.89 KB