Skip to content

Commit 10bacc6

Browse files
bk2204gitster
authored andcommitted
csum-file: define hashwrite's count as a uint32_t
We want to call this code from Rust and ensure that the types are the same for compatibility, which is easiest to do if the type is a fixed size. Since unsigned int is 32 bits on all the platforms we care about, define it as a uint32_t instead. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 3e2a29c commit 10bacc6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

csum-file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void discard_hashfile(struct hashfile *f)
110110
free_hashfile(f);
111111
}
112112

113-
void hashwrite(struct hashfile *f, const void *buf, unsigned int count)
113+
void hashwrite(struct hashfile *f, const void *buf, uint32_t count)
114114
{
115115
while (count) {
116116
unsigned left = f->buffer_len - f->offset;

csum-file.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void free_hashfile(struct hashfile *f);
6363
*/
6464
int finalize_hashfile(struct hashfile *, unsigned char *, enum fsync_component, unsigned int);
6565
void discard_hashfile(struct hashfile *);
66-
void hashwrite(struct hashfile *, const void *, unsigned int);
66+
void hashwrite(struct hashfile *, const void *, uint32_t);
6767
void hashflush(struct hashfile *f);
6868
void crc32_begin(struct hashfile *);
6969
uint32_t crc32_end(struct hashfile *);

0 commit comments

Comments
 (0)