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 Stein <gs...@lyra.org> on 2003/03/08 00:14:32 UTC

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

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