diff options
author | René Scharfe <l.s.r@web.de> | 2020-09-06 10:59:06 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-09-06 13:40:41 -0700 |
commit | 7744a5d6921c457a05224cd7f5554e972df634b0 (patch) | |
tree | 1f496608471e1ca702be6985a41ad755b7a85a6d /pack-bitmap-write.c | |
parent | midx: use hashwrite_u8() in write_midx_header() (diff) | |
download | tgif-7744a5d6921c457a05224cd7f5554e972df634b0.tar.xz |
pack-bitmap-write: use hashwrite_be32() in write_hash_cache()
Call hashwrite_be32() instead of open-coding it. This is shorter and
easier to read.
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-bitmap-write.c')
-rw-r--r-- | pack-bitmap-write.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c index a7a4964b50..5e998bdaa7 100644 --- a/pack-bitmap-write.c +++ b/pack-bitmap-write.c @@ -503,8 +503,7 @@ static void write_hash_cache(struct hashfile *f, for (i = 0; i < index_nr; ++i) { struct object_entry *entry = (struct object_entry *)index[i]; - uint32_t hash_value = htonl(entry->hash); - hashwrite(f, &hash_value, sizeof(hash_value)); + hashwrite_be32(f, entry->hash); } } |