@@ -528,9 +528,9 @@ int loose_object_info(struct repository *r,
528528}
529529
530530static void hash_object_body (const struct git_hash_algo * algo , struct git_hash_ctx * c ,
531- const void * buf , unsigned long len ,
531+ const void * buf , size_t len ,
532532 struct object_id * oid ,
533- char * hdr , int * hdrlen )
533+ char * hdr , size_t * hdrlen )
534534{
535535 algo -> init_fn (c );
536536 git_hash_update (c , hdr , * hdrlen );
@@ -539,16 +539,16 @@ static void hash_object_body(const struct git_hash_algo *algo, struct git_hash_c
539539}
540540
541541static void write_object_file_prepare (const struct git_hash_algo * algo ,
542- const void * buf , unsigned long len ,
542+ const void * buf , size_t len ,
543543 enum object_type type , struct object_id * oid ,
544- char * hdr , int * hdrlen )
544+ char * hdr , size_t * hdrlen )
545545{
546546 struct git_hash_ctx c ;
547547
548548 /* Generate the header */
549549 * hdrlen = format_object_header (hdr , * hdrlen , type , len );
550550
551- /* Sha1.. */
551+ /* Hash (function pointers) computation */
552552 hash_object_body (algo , & c , buf , len , oid , hdr , hdrlen );
553553}
554554
@@ -682,11 +682,11 @@ int finalize_object_file_flags(const char *tmpfile, const char *filename,
682682}
683683
684684void hash_object_file (const struct git_hash_algo * algo , const void * buf ,
685- unsigned long len , enum object_type type ,
685+ size_t len , enum object_type type ,
686686 struct object_id * oid )
687687{
688688 char hdr [MAX_HEADER_LEN ];
689- int hdrlen = sizeof (hdr );
689+ size_t hdrlen = sizeof (hdr );
690690
691691 write_object_file_prepare (algo , buf , len , type , oid , hdr , & hdrlen );
692692}
@@ -1050,7 +1050,7 @@ int stream_loose_object(struct input_stream *in_stream, size_t len,
10501050 return err ;
10511051}
10521052
1053- int write_object_file_flags (const void * buf , unsigned long len ,
1053+ int write_object_file_flags (const void * buf , size_t len ,
10541054 enum object_type type , struct object_id * oid ,
10551055 struct object_id * compat_oid_in , unsigned flags )
10561056{
@@ -1059,7 +1059,7 @@ int write_object_file_flags(const void *buf, unsigned long len,
10591059 const struct git_hash_algo * compat = repo -> compat_hash_algo ;
10601060 struct object_id compat_oid ;
10611061 char hdr [MAX_HEADER_LEN ];
1062- int hdrlen = sizeof (hdr );
1062+ size_t hdrlen = sizeof (hdr );
10631063
10641064 /* Generate compat_oid */
10651065 if (compat ) {
0 commit comments