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

Re: CVS update: MODIFIED: svntest ...

From: Greg Stein <gstein_at_lyra.org>
Date: 2001-08-11 00:54:08 CEST

On Fri, Aug 10, 2001 at 10:42:04PM -0000, kfogel@tigris.org wrote:
>...
> +const char *
> +svn_fs_db_lockfile (svn_fs_t *fs)
> +{
> + return apr_psprintf (fs->pool, "%s/%s",
> + fs->lock_path,
> + SVN_FS__REPOS_DB_LOCKFILE);

The above is more efficient as:

       return apr_pstrcat (fs->pool,
                           fs->lock_path,
                           "/" SVN_FS__REPOS_DB_LOCKFILE,
                           NULL);

There are similar examples throughout...

>...
> +create_locks (svn_fs_t *fs, const char *path)
> {
> + apr_file_t *f = NULL;
> + apr_size_t written;
> + apr_status_t apr_err;
> + const char *contents;
> + const char *lockfile_path;
> +
> + /* Create the locks directory. */
> + fs->lock_path = apr_psprintf (fs->pool, "%s/%s",
> + path, SVN_FS__REPOS_LOCK_DIR);

Same as above.

> + apr_err = apr_dir_make (fs->lock_path, APR_OS_DEFAULT, fs->pool);
> + if (! APR_STATUS_IS_SUCCESS (apr_err))
> + return svn_error_createf (apr_err, 0, 0, fs->pool,
> + "creating lock dir `%s'", fs->lock_path);
> +
> + /* Create the DB lockfile under that directory. */
> + lockfile_path = apr_psprintf (fs->pool, "%s", svn_fs_db_lockfile (fs));

       lockfile_path = svn_fs_db_lockfile (fs);

(no need to psprintf the thing...)

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 Oct 21 14:36:35 2006

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.