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