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

Re: [PATCH] Completed TODO: svn_stream_copy3()

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Sat, 11 Apr 2009 12:47:13 +0300 (Jerusalem Daylight Time)

Edmund Wong wrote on Fri, 10 Apr 2009 at 23:34 +0800:
> >
> > if (cancel_func)
> > {
> > err = cancel_func(cancel_baton);
> > if (err)
> > break;
> > }
>
> Is this allowed?
>
> if (err = cancel_func(cancel_baton))
> break;
>

It's wrong, because cancel_func may be NULL.

If I were you, I'd try to keep the logic changes minimal --- i.e., avoid
reordering the various checks on LEN and CANCEL_FUNC. They work well as
they are, so no reason to change them. (If you change something, you have
to think whether the change is correct...)

As a bonus, it'll make the diff easier to read/understand.

Daniel

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1646177
Received on 2009-04-11 11:47:35 CEST

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.