You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ko...@apache.org on 2016/10/11 15:38:37 UTC

svn commit: r1764271 - /subversion/trunk/subversion/libsvn_client/conflicts.c

Author: kotkov
Date: Tue Oct 11 15:38:36 2016
New Revision: 1764271

URL: http://svn.apache.org/viewvc?rev=1764271&view=rev
Log:
* subversion/libsvn_client/conflicts.c
  (check_move_ancestry): Explicitly initialize the output argument in
   all cases, to make the code a bit clearer.

Modified:
    subversion/trunk/subversion/libsvn_client/conflicts.c

Modified: subversion/trunk/subversion/libsvn_client/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/conflicts.c?rev=1764271&r1=1764270&r2=1764271&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_client/conflicts.c Tue Oct 11 15:38:36 2016
@@ -295,8 +295,6 @@ check_move_ancestry(svn_boolean_t *relat
   apr_array_header_t *location_revisions;
   svn_dirent_t *dirent;
 
-  *related = FALSE;
-
   location_revisions = apr_array_make(scratch_pool, 1, sizeof(svn_revnum_t));
   APR_ARRAY_PUSH(location_revisions, svn_revnum_t) = copyfrom_rev;
   deleted_url = svn_uri_canonicalize(apr_pstrcat(scratch_pool,
@@ -320,18 +318,26 @@ check_move_ancestry(svn_boolean_t *relat
       if (deleted_location[0] == '/')
         deleted_location++;
       if (strcmp(deleted_location, copyfrom_path) != 0)
-        return SVN_NO_ERROR;
+        {
+          *related = FALSE;
+          return SVN_NO_ERROR;
+        }
     }
   else
-    return SVN_NO_ERROR;
+    {
+      *related = FALSE;
+      return SVN_NO_ERROR;
+    }
 
   /* Verify that copyfrom_rev >= last-changed revision of the deleted node. */
   SVN_ERR(svn_ra_stat(ra_session, "", deleted_rev - 1, &dirent, scratch_pool));
   if (dirent == NULL || copyfrom_rev < dirent->created_rev)
-    return SVN_NO_ERROR;
+    {
+      *related = FALSE;
+      return SVN_NO_ERROR;
+    }
 
   *related = TRUE;
-
   return SVN_NO_ERROR;
 }