diff options
| author | Junio C Hamano <gitster@pobox.com> | 2017-08-11 13:26:57 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2017-08-11 13:26:57 -0700 |
| commit | 32f90258bd510d84dfe8970211ec1427e9e327dc (patch) | |
| tree | 6727e0574f5c648aec927e43545617b0c5fca32e /builtin/pack-objects.c | |
| parent | Merge branch 'rs/bswap-ubsan-fix' (diff) | |
| parent | ls-files: don't try to prune an empty index (diff) | |
| download | git-32f90258bd510d84dfe8970211ec1427e9e327dc.tar.gz git-32f90258bd510d84dfe8970211ec1427e9e327dc.zip | |
Merge branch 'rs/move-array'
Code clean-up.
* rs/move-array:
ls-files: don't try to prune an empty index
apply: use COPY_ARRAY and MOVE_ARRAY in update_image()
use MOVE_ARRAY
add MOVE_ARRAY
Diffstat (limited to 'builtin/pack-objects.c')
| -rw-r--r-- | builtin/pack-objects.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index f4a8441fe9..e730b415bf 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -1298,9 +1298,8 @@ static int check_pbase_path(unsigned hash) done_pbase_paths_alloc); done_pbase_paths_num++; if (pos < done_pbase_paths_num) - memmove(done_pbase_paths + pos + 1, - done_pbase_paths + pos, - (done_pbase_paths_num - pos - 1) * sizeof(unsigned)); + MOVE_ARRAY(done_pbase_paths + pos + 1, done_pbase_paths + pos, + done_pbase_paths_num - pos - 1); done_pbase_paths[pos] = hash; return 0; } |
