From: Jeff King Date: Mon, 09 Sep 2013 19:53:04 GMT Subject: Re: [PATCH 3/5] config: set errno in numeric git_parse_* functions Message-ID: <20130909195304.GB14021@sigill.intra.peff.net> In-Reply-To: On Sun, Sep 08, 2013 at 08:36:35PM -0400, Eric Sunshine wrote: > On Sun, Sep 8, 2013 at 4:36 AM, Jeff King wrote: > > 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/ Thanks. That is what I get for last-minute tweaking of the commit message (and I am OK with splitting the infinitive :) ). -Peff