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>
René Scharfe committed
Sep 6, 2020 at 10:59 UTC
7744a5d6921c457a05224cd7f5554e972df634b0
1 file changed
+1
-2
pack-bitmap-write.c
+1
-2
@@ -503,8 +503,7 @@ static void write_hash_cache(struct hashfile *f,
503
504
for (i = 0; i < index_nr; ++i) {
505
struct object_entry *entry = (struct object_entry *)index[i];
506
- uint32_t hash_value = htonl(entry->hash);
507
- hashwrite(f, &hash_value, sizeof(hash_value));
506
+ hashwrite_be32(f, entry->hash);
507
}
508
}
509