mailinfo: remove a no-op call convert_to_utf8(it, "")
[gitweb.git] / archive-zip.c
index 480360d0aa66d298853ac7dadf1efc8747793e9a..9db47357b02d4c33fc4e2d1edb8d948b2b3a496f 100644 (file)
@@ -535,14 +535,14 @@ static void write_zip_trailer(const unsigned char *sha1)
        copy_le16_clamp(trailer.entries, zip_dir_entries, &clamped);
        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);
        if (clamped)
                write_zip64_trailer();
        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)