git.99rst.org
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
014f144
)
pack-bitmap-write: use hashwrite_be32() in write_hash_cache()
author
René Scharfe
<redacted>
Sun, 6 Sep 2020 08:59:06 +0000
(10:59 +0200)
committer
Junio C Hamano
<redacted>
Sun, 6 Sep 2020 20:40:41 +0000
(13:40 -0700)
Call hashwrite_be32() instead of open-coding it. This is shorter and
easier to read.
Signed-off-by: René Scharfe <redacted>
Signed-off-by: Junio C Hamano <redacted>
pack-bitmap-write.c
patch
|
blob
|
history
diff --git
a/pack-bitmap-write.c
b/pack-bitmap-write.c
index a7a4964b50d1936be0d769724c1b0b5fa5420672..5e998bdaa7998817a4dc73e5d6da711e0615b992 100644
(file)
--- 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);
}
}
git clone https://git.99rst.org/PROJECT