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

Re: svn commit: rev 5244 - trunk/subversion/tests/libsvn_subr

From: Greg Stein <gstein_at_lyra.org>
Date: 2003-03-08 01:14:32 CET

On Fri, Mar 07, 2003 at 02:28:06PM -0600, dlr@tigris.org wrote:
>...
> +++ trunk/subversion/tests/libsvn_subr/config-test.c Fri Mar 7 14:27:39 2003
> @@ -56,6 +56,7 @@
> svn_boolean_t msg_only,
> apr_pool_t *pool)
> {
> + svn_error_t *err;
> svn_config_t *cfg;
> int i;
> char *key, *py_val, *c_val;
> @@ -65,8 +66,9 @@
> if (msg_only)
> return SVN_NO_ERROR;
>
> - if (svn_config_read(&cfg, "config-test.cfg", TRUE, pool) != SVN_NO_ERROR)
> - fail(pool, "test failed: cfg NULL");
> + err = svn_config_read(&cfg, "config-test.cfg", TRUE, pool);
> + if (err != SVN_NO_ERROR)
> + return err;

The standard idiom here would be:

  SVN_ERR( svn_config_read(&cfg, "config-test.cfg", TRUE, pool) );

No variables, and no if/return statements.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Mar 8 01:09:24 2003

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.