Re: [PATCH] zlib.c: use size_t for size

2018-10-13 Thread Johannes Sixt
Am 13.10.18 um 04:46 schrieb Jeff King: But no, right before that we have this line: offset -= win->offset; So offset is in fact no longer its original meaning of "offset into the packfile", but is now an offset of the specific request into the window we found. So I think it's

Re: [PATCH] zlib.c: use size_t for size

2018-10-12 Thread Jeff King
On Fri, Oct 12, 2018 at 10:38:45PM -0400, Jeff King wrote: > So right now let's imagine that off_t is 64-bit, and "unsigned long" is > 32-bit (e.g., 32-bit system, or an IL32P64 model like Windows). We'll > repeatedly ask use_pack() for a window, and it will tell us how many > bytes we have in

Re: [PATCH] zlib.c: use size_t for size

2018-10-12 Thread Jeff King
On Fri, Oct 12, 2018 at 04:07:25PM +0900, Junio C Hamano wrote: > diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c > index e6316d294d..b9ca04eb8a 100644 > --- a/builtin/pack-objects.c > +++ b/builtin/pack-objects.c > @@ -266,15 +266,15 @@ static void copy_pack_data(struct hashfile *f,

Re: [PATCH] zlib.c: use size_t for size

2018-10-12 Thread Ramsay Jones
On 12/10/18 16:34, Johannes Schindelin wrote: > Hi Junio, > > On Fri, 12 Oct 2018, Junio C Hamano wrote: > >> Johannes Schindelin writes: >> >>> Hi Junio, >>> >>> On Fri, 12 Oct 2018, Junio C Hamano wrote: >>> From: Martin Koegler Date: Thu, 10 Aug 2017 20:13:08 +0200

Re: [PATCH] zlib.c: use size_t for size

2018-10-12 Thread Johannes Schindelin
Hi Junio, On Fri, 12 Oct 2018, Junio C Hamano wrote: > Johannes Schindelin writes: > > > Hi Junio, > > > > On Fri, 12 Oct 2018, Junio C Hamano wrote: > > > >> From: Martin Koegler > >> Date: Thu, 10 Aug 2017 20:13:08 +0200 > >> > >> Signed-off-by: Martin Koegler > >> Signed-off-by: Junio C

Re: [PATCH] zlib.c: use size_t for size

2018-10-12 Thread Junio C Hamano
Johannes Schindelin writes: > Hi Junio, > > On Fri, 12 Oct 2018, Junio C Hamano wrote: > >> From: Martin Koegler >> Date: Thu, 10 Aug 2017 20:13:08 +0200 >> >> Signed-off-by: Martin Koegler >> Signed-off-by: Junio C Hamano >> --- >> >> * I made minimal adjustments to make the change apply

Re: [PATCH] zlib.c: use size_t for size

2018-10-12 Thread Johannes Schindelin
Hi Junio, On Fri, 12 Oct 2018, Junio C Hamano wrote: > From: Martin Koegler > Date: Thu, 10 Aug 2017 20:13:08 +0200 > > Signed-off-by: Martin Koegler > Signed-off-by: Junio C Hamano > --- > > * I made minimal adjustments to make the change apply to today's >codebase. I still find some

[PATCH] zlib.c: use size_t for size

2018-10-12 Thread Junio C Hamano
From: Martin Koegler Date: Thu, 10 Aug 2017 20:13:08 +0200 Signed-off-by: Martin Koegler Signed-off-by: Junio C Hamano --- * I made minimal adjustments to make the change apply to today's codebase. I still find some choices and mixing of off_t and size_t done by the patch a bit iffy,