From: Junio C Hamano Date: Thu, 17 Aug 2017 17:53:14 GMT Subject: Re: [Patch size_t V3 18/19] Convert tree-walk to size_t Message-ID: In-Reply-To: <1502914591-26215-19-git-send-email-martin@mail.zuhause> Martin Koegler writes: > From: Martin Koegler > > Signed-off-by: Martin Koegler > --- > tree-walk.c | 17 +++++++++-------- > tree-walk.h | 4 ++-- > tree.h | 2 +- > 3 files changed, 12 insertions(+), 11 deletions(-) In this one, I did not find anything suspicious. > diff --git a/tree-walk.c b/tree-walk.c > index 7c9f9e3..a7d8b2a 100644 > --- a/tree-walk.c > +++ b/tree-walk.c > @@ -22,10 +22,11 @@ static const char *get_mode(const char *str, unsigned int *modep) > return str; > } > > -static int decode_tree_entry(struct tree_desc *desc, const char *buf, unsigned long size, struct strbuf *err) > +static int decode_tree_entry(struct tree_desc *desc, const char *buf, size_t size, struct strbuf *err) > { > const char *path; > - unsigned int mode, len; > + unsigned int mode; > + size_t len; > > if (size < 23 || buf[size - 21]) { > strbuf_addstr(err, _("too-short tree object")); The original was especially bad around here, as it didn't even use ulong. The conversion makes sense. Thanks.