diff options
author | Martin Koegler <martin.koegler@chello.at> | 2017-08-10 20:13:08 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-10 14:45:02 -0700 |
commit | c65861d8d17a4e1be0bb0f613c12f48b646837e4 (patch) | |
tree | e7c0218142154ecd29fc1d7c12a2dd5f8f26ae1a /zlib.c | |
parent | 4274c698f46a9bc45834c4904e7e113450c042fb (diff) | |
download | git-mk/use-size-t-in-zlib.tar.gz |
zlib.c: use size_t for sizemk/use-size-t-in-zlib
Signed-off-by: Martin Koegler <martin.koegler@chello.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'zlib.c')
-rw-r--r-- | zlib.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -29,7 +29,7 @@ static const char *zerr_to_string(int status) */ /* #define ZLIB_BUF_MAX ((uInt)-1) */ #define ZLIB_BUF_MAX ((uInt) 1024 * 1024 * 1024) /* 1GB */ -static inline uInt zlib_buf_cap(unsigned long len) +static inline uInt zlib_buf_cap(size_t len) { return (ZLIB_BUF_MAX < len) ? ZLIB_BUF_MAX : len; } @@ -46,8 +46,8 @@ static void zlib_pre_call(git_zstream *s) static void zlib_post_call(git_zstream *s) { - unsigned long bytes_consumed; - unsigned long bytes_produced; + size_t bytes_consumed; + size_t bytes_produced; bytes_consumed = s->z.next_in - s->next_in; bytes_produced = s->z.next_out - s->next_out; @@ -150,7 +150,7 @@ int git_inflate(git_zstream *strm, int flush) #define deflateBound(c,s) ((s) + (((s) + 7) >> 3) + (((s) + 63) >> 6) + 11) #endif -unsigned long git_deflate_bound(git_zstream *strm, unsigned long size) +size_t git_deflate_bound(git_zstream *strm, size_t size) { return deflateBound(&strm->z, size); } |