You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@codematters.co.uk> on 2005/02/27 17:50:39 UTC
[PATCH] redundant call to svn_path_cstring_from_utf8?
Is this old code that is redundant or is it checking something?
Index: subversion/libsvn_fs_base/fs.c
===================================================================
--- subversion/libsvn_fs_base/fs.c (revision 13177)
+++ subversion/libsvn_fs_base/fs.c (working copy)
@@ -542,7 +542,6 @@
base_create (svn_fs_t *fs, const char *path, apr_pool_t *pool)
{
svn_error_t *svn_err;
- const char *path_apr;
const char *path_native;
base_fs_data_t *bfd;
@@ -557,7 +556,6 @@
/* Initialize the fs's path. */
fs->path = apr_pstrdup (fs->pool, path);
- SVN_ERR (svn_path_cstring_from_utf8 (&path_apr, fs->path, fs->pool));
SVN_ERR (bdb_write_config (fs));
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] redundant call to svn_path_cstring_from_utf8?
Posted by kf...@collab.net.
Philip Martin <ph...@codematters.co.uk> writes:
> Is this old code that is redundant or is it checking something?
It's old & redundant.
It looks like someone didn't notice that 'path_native', or that
whoever put in 'path_native' didn't notice 'path_apr'. I'm too lazy
to run 'svn blame', or perhaps too afraid that "someone" will be me!
In any case, 'path_native' is what is used elsewhere, so your patch
should be fine.
-K
> Index: subversion/libsvn_fs_base/fs.c
> ===================================================================
> --- subversion/libsvn_fs_base/fs.c (revision 13177)
> +++ subversion/libsvn_fs_base/fs.c (working copy)
> @@ -542,7 +542,6 @@
> base_create (svn_fs_t *fs, const char *path, apr_pool_t *pool)
> {
> svn_error_t *svn_err;
> - const char *path_apr;
> const char *path_native;
> base_fs_data_t *bfd;
>
> @@ -557,7 +556,6 @@
>
> /* Initialize the fs's path. */
> fs->path = apr_pstrdup (fs->pool, path);
> - SVN_ERR (svn_path_cstring_from_utf8 (&path_apr, fs->path, fs->pool));
>
> SVN_ERR (bdb_write_config (fs));
>
>
> --
> Philip Martin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org