[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r903342 - /subversion/trunk/subversion/libsvn_diff/parse-diff.c

From: Stefan Sperling <stsp_at_elego.de>
Date: Tue, 26 Jan 2010 19:32:49 +0100

On Tue, Jan 26, 2010 at 10:02:02AM -0800, Blair Zajac wrote:
> On 01/26/2010 09:54 AM, stsp_at_apache.org wrote:
> >Author: stsp
> >Date: Tue Jan 26 17:54:14 2010
> >New Revision: 903342
> >
> >URL: http://svn.apache.org/viewvc?rev=903342&view=rev
> >Log:
> >* subversion/libsvn_diff/parse-diff.c
> > (parse_offset): Clearing errno is never necessary, so don't.
>
> Why are you claiming this?

I've been told some time ago, by long-time unix hackers,
that clearning errno is usually not necessary, one of the few
exceptions to this rule being the strtol() family of functions.
I didn't account for this exception when writing the log message,
which was wrong.

But looking at the APR code, apr_atoi64() is not using strol() behind
the scenes, it's a custom implementation. In APR-1.3.x, apr_atoi64()
actually clears errno itself before doing anything.

But (and this is why I am happy that you asked this question and
made me look harder) errno isn't cleared in apr_atoi64() of APR-0.9.
This could be a problem.

So I'll revert the change and put a better comment in place
then the one that was there before.

Thanks for asking,
Stefan
Received on 2010-01-26 19:33:43 CET

This is an archived mail posted to the Subversion Dev mailing list.