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

Re: svn commit: r1815799 - in /subversion/trunk/subversion: libsvn_ra_serf/commit.c tests/libsvn_ra/ra-test.c

From: Julian Foad <julianfoad_at_apache.org>
Date: Wed, 22 Nov 2017 17:01:36 +0100

Evgeny Kotkov wrote:
> Julian Foad <julianfoad_at_apache.org> writes:
>> Don't replace it with 'relpath &&' instead, however. If relpath is null then
>> I think the next line (svn_hash_gets(..., relpath)) would immediately crash
>> anyway, so allowing it here is useless and therefore confusing. Remove that
>> condition entirely. That's my suggestion.
>
> The condition is inverted in the sense that it checks for a null relpath
> and returns if so — in other words, the svn_hash_gets() won't get called
> if the relpath is null.

Oh... oops! I was confused. Right you are.

> However, as it turns out, this condition can indeed be simplified by not
> checking for null, as the only calling site where the relpath might be
> null, setup_proppatch_headers(), already checks for it. (Among the other
> two calling sites, the relpath cannot be null as it would have segfaulted
> earlier).
>
> I committed this simplification in r1816061, thanks!

Thanks.

- Julian
Received on 2017-11-22 17:01:39 CET

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