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>
This commit is contained in:
parent
014f1447f0
commit
7744a5d692
@ -503,8 +503,7 @@ static void write_hash_cache(struct hashfile *f,
|
|||||||
|
|
||||||
for (i = 0; i < index_nr; ++i) {
|
for (i = 0; i < index_nr; ++i) {
|
||||||
struct object_entry *entry = (struct object_entry *)index[i];
|
struct object_entry *entry = (struct object_entry *)index[i];
|
||||||
uint32_t hash_value = htonl(entry->hash);
|
hashwrite_be32(f, entry->hash);
|
||||||
hashwrite(f, &hash_value, sizeof(hash_value));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user