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

Re: svn commit: r1040831 - in /subversion/trunk/subversion: include/svn_checksum.h libsvn_subr/checksum.c

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Mon, 06 Dec 2010 15:19:58 +0000

On Sun, 2010-12-05, Stefan Fuhrmann wrote:
> On 02.12.2010 12:18, Julian Foad wrote:
> > A good test for whether it's worth making an API accept NULL as an input
> > is: what proportion of the callers would find that useful? I see there
> > are about 40 callers in the code base. Would you mind scanning through
> > them and letting us know?
> >
> There were two places where the callers had to check
> for NULL before calling svn_checksum_to_cstring().
> I removed those checks in r1042460.

Great. And three more in load-fs-vtable.c, which I removed in r1042673.

> Two more places might try to call the function with a NULL
> checksum under adverse conditions:
> * 6x in dump_node() (subversion/libsvn_repos/dump.c)
> because the svn_fs_file_checksum() is not instructed
> to calculate missing checksums
> * While constructing an error message in window_handler()
> (subversion\libsvn_wc\update_editor.c)
> There are about ten more places where it is not entirely
> crystal clear that the desired checksum is actually available.
> However, I'm reasonably sure that they will in the respective
> contexts (e.g. wc operations).

Thanks for checking, Stefan. That gives me reason to like this change.

- Julian
Received on 2010-12-06 16:20:44 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.