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

Re: svn commit: r11799 - in branches/locking/subversion: include libsvn_fs

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2004-11-10 06:49:57 CET

On Tue, 2004-11-09 at 15:13, Peter N. Lundblad wrote:
> > + if (access_ctx)
> > + *username = access_ctx->username;
> > + else
> > + return svn_error_create (SVN_ERR_FS_NO_USER, 0, "Access context is NULL.");

> Do we usually check precoditions like this? I don't say it is bad, just
> don't see it in other places. For example, we don't check in all svn_fs
> functions that fs is non-NULL, do we?

I'd say it's bad. It's extra hair in our code, it's not something we
normally do, it only handles a very special case (an uninitialized
garbage value would still seg fault just as readily as NULL would), and
even if it's worth checking at all, it's assert fodder rather than
"return an error" fodder.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 10 06:50:42 2004

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.