summaryrefslogtreecommitdiff
path: root/archive-zip.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2015-03-13 23:39:31 +0000
committerJunio C Hamano <gitster@pobox.com>2015-03-13 22:43:12 -0700
commitaeecdcd4c1c1a380e45aecadd8042a6a90ee3a20 (patch)
tree5785eb9d8d0dce488a487214caa3ab1ca283835b /archive-zip.c
parent13609673c4410df754197ec4ae9b57f15bc803d4 (diff)
downloadgit-aeecdcd4c1c1a380e45aecadd8042a6a90ee3a20.tar.gz
zip: use GIT_SHA1_HEXSZ for trailers
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'archive-zip.c')
-rw-r--r--archive-zip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/archive-zip.c b/archive-zip.c
index 4bde019bce..b669e506ee 100644
--- a/archive-zip.c
+++ b/archive-zip.c
@@ -427,12 +427,12 @@ static void write_zip_trailer(const unsigned char *sha1)
copy_le16(trailer.entries, zip_dir_entries);
copy_le32(trailer.size, zip_dir_offset);
copy_le32(trailer.offset, zip_offset);
- copy_le16(trailer.comment_length, sha1 ? 40 : 0);
+ copy_le16(trailer.comment_length, sha1 ? GIT_SHA1_HEXSZ : 0);
write_or_die(1, zip_dir, zip_dir_offset);
write_or_die(1, &trailer, ZIP_DIR_TRAILER_SIZE);
if (sha1)
- write_or_die(1, sha1_to_hex(sha1), 40);
+ write_or_die(1, sha1_to_hex(sha1), GIT_SHA1_HEXSZ);
}
static void dos_time(time_t *time, int *dos_date, int *dos_time)