From aeecdcd4c1c1a380e45aecadd8042a6a90ee3a20 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Fri, 13 Mar 2015 23:39:31 +0000 Subject: zip: use GIT_SHA1_HEXSZ for trailers Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- archive-zip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'archive-zip.c') diff --git a/archive-zip.c b/archive-zip.c index 4bde019bc..b669e506e 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) -- cgit v1.2.1