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 2001/08/10 22:54:08 UTC
Re: CVS update: MODIFIED: svntest ...
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
Re: CVS update: MODIFIED: svntest ...
Posted by kf...@collab.net.
Greg Stein <gs...@lyra.org> writes:
> > +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...
Thanks, will change.
> (no need to psprintf the thing...)
Sheesh. Codin' on autopilot.
Thanks for watching, Greg.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org