Skip to content

Commit 7744a5d

Browse files
rscharfegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 014f144 commit 7744a5d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pack-bitmap-write.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,7 @@ static void write_hash_cache(struct hashfile *f,
503503

504504
for (i = 0; i < index_nr; ++i) {
505505
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);
508507
}
509508
}
510509

0 commit comments

Comments
 (0)