[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: Blair Zajac <blair_at_orcaware.com>
Date: Tue, 26 Jan 2010 11:23:18 -0800

On 01/26/2010 10:32 AM, Stefan Sperling wrote:
> 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.

Thanks for checking this, I saw the same with with 0.9.

My understand is that if you ever need to check the errno then you
should set it 0 yourself because system and library calls will not set
it to 0 for you. How is strtol() different?

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

Thanks!

Regards,
Blair
Received on 2010-01-26 20:24:25 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.