You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/05/13 16:26:28 UTC
svn commit: r1481870 - /subversion/trunk/subversion/libsvn_fs_fs/tree.c
Author: brane
Date: Mon May 13 14:26:28 2013
New Revision: 1481870
URL: http://svn.apache.org/r1481870
Log:
Follow-up to r1469520: Remove another initialization that's not needed.
* subversion/libsvn_fs_fs/tree.c (open_path): Reorder code to avoid
premature initialization.
Modified:
subversion/trunk/subversion/libsvn_fs_fs/tree.c
Modified: subversion/trunk/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/tree.c?rev=1481870&r1=1481869&r2=1481870&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/tree.c Mon May 13 14:26:28 2013
@@ -911,22 +911,24 @@ open_path(parent_path_t **parent_path_p,
a sibling of PATH has been presently accessed. Try to start the lookup
directly at the parent node, if the caller did not requested the full
parent chain. */
- const char *directory = NULL;
assert(svn_fs__is_canonical_abspath(path));
if (flags & open_path_node_only)
{
- directory = svn_dirent_dirname(path, pool);
+ const char *directory = svn_dirent_dirname(path, pool);
if (directory[1] != 0) /* root nodes are covered anyway */
- SVN_ERR(dag_node_cache_get(&here, root, directory, TRUE, pool));
+ {
+ SVN_ERR(dag_node_cache_get(&here, root, directory, TRUE, pool));
+ /* did the shortcut work? */
+ if (here)
+ {
+ path_so_far = directory;
+ rest = path + strlen(directory) + 1;
+ }
+ }
}
/* did the shortcut work? */
- if (here)
- {
- path_so_far = directory;
- rest = path + strlen(directory) + 1;
- }
- else
+ if (!here)
{
/* Make a parent_path item for the root node, using its own current
copy id. */