You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Hudson <gh...@MIT.EDU> on 2004/11/10 05:49:57 UTC
Re: svn commit: r11799 - in branches/locking/subversion: include
libsvn_fs
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