Re: [PATCH 3/5] config: set errno in numeric git_parse_* functions
On Sun, Sep 8, 2013 at 4:36 AM, Jeff King <peff@peff.net> wrote:
Show 10 quoted lines
> When we are parsing an integer or unsigned long, we use
> the strto*max functions, which properly set errno to ERANGE
> if we get a large value. However, we also do further range
> checks after applying our multiplication factor, but do not
> set ERANGE. This means that a caller cannot tell if an error
> was caused by ERANGE or if the input was simply not a valid
> number.
>
> This patch teaches git_parse_signed and git_parse_unsigned
> reliably set ERANGE for range errors, and EINVAL for other
Missing "to": s/reliably/to reliably/
Or, if you don't like splitting the infinitive:
s/reliably set ERANGE/to set ERANGE reliably/
> errors.
>
> Signed-off-by: Jeff King <peff@peff.net>