diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-02-14 00:39:11 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-14 00:39:11 +0300 |
commit | 2dc69eef1b92aab539164a098558c8f51a12f36f (patch) | |
tree | d350f3f5f067fa209127456f5db156f6c742f546 /packfile.c | |
parent | 9238941618a3d10f77d20e7f2a72533e701eb18f (diff) | |
parent | ad622a256f0dd0be44ca17f58b3f5b43cedb4320 (diff) |
Merge branch 'ds/use-get-be64'
Code clean-up.
* ds/use-get-be64:
packfile: use get_be64() for large offsets
Diffstat (limited to 'packfile.c')
-rw-r--r-- | packfile.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/packfile.c b/packfile.c index 2d5774dbc0..7dbe8739d1 100644 --- a/packfile.c +++ b/packfile.c @@ -1713,8 +1713,7 @@ off_t nth_packed_object_offset(const struct packed_git *p, uint32_t n) return off; index += p->num_objects * 4 + (off & 0x7fffffff) * 8; check_pack_index_ptr(p, index); - return (((uint64_t)ntohl(*((uint32_t *)(index + 0)))) << 32) | - ntohl(*((uint32_t *)(index + 4))); + return get_be64(index); } } |