From: Junio C Hamano Date: Wed, 15 Jul 2026 17:22:54 GMT Subject: Re: [PATCH GSoC v18 10/13] transport: add client support for object-info Message-ID: In-Reply-To: <20260715-ps-eric-work-rebase-v18-10-34d7adb051bb@gmail.com> Pablo Sabater writes: > +static size_t parse_object_size(const char *s, size_t *res) > +{ > + uintmax_t uim; > + > + if (!s[0] || s[strspn(s, "0123456789")]) > + return -1; > + errno = 0; > + uim = strtoumax(s, NULL, 10); > + if (errno || uim > SIZE_MAX) > + return -1; > + *res = uim; > + return 0; > +} Since size_t is unsigned, returning -1 is a bit problematic, isn't it? Perhaps this should return a plain 'int' instead. The sole caller only cares about a boolean "did we succeed or fail?" result, and more importantly, the actual size parsed is already returned via the out-parameter. Thanks.