subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1504888 - /subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/verify.c
Date Fri, 19 Jul 2013 14:30:20 GMT
Author: stefan2
Date: Fri Jul 19 14:30:20 2013
New Revision: 1504888

URL: http://svn.apache.org/r1504888
Log:
On the fsfs-improvements branch:  Simplify FSFS verify_walker.

* subversion/libsvn_fs_fs/verify.c
  (verify_walker): simplify since baton is never NULL

Modified:
    subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/verify.c

Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/verify.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/verify.c?rev=1504888&r1=1504887&r2=1504888&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/verify.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/verify.c Fri Jul 19 14:30:20
2013
@@ -70,47 +70,39 @@ verify_walker(representation_t *rep,
               svn_fs_t *fs,
               apr_pool_t *scratch_pool)
 {
-  if (baton)
-    {
-      verify_walker_baton_t *walker_baton = baton;
-      void *previous_file;
+  verify_walker_baton_t *walker_baton = baton;
+  void *previous_hint;
 
-      /* notify and free resources periodically */
-      if (   walker_baton->iteration_count > 1000
-          || walker_baton->file_count > 16)
+  /* notify and free resources periodically */
+  if (   walker_baton->iteration_count > 1000
+      || walker_baton->file_count > 16)
+    {
+      if (   walker_baton->notify_func
+          && rep->revision != walker_baton->last_notified_revision)
         {
-          if (   walker_baton->notify_func
-              && rep->revision != walker_baton->last_notified_revision)
-            {
-              walker_baton->notify_func(rep->revision,
-                                        walker_baton->notify_baton,
-                                        scratch_pool);
-              walker_baton->last_notified_revision = rep->revision;
-            }
-
-          svn_pool_clear(walker_baton->pool);
-
-          walker_baton->iteration_count = 0;
-          walker_baton->file_count = 0;
-          walker_baton->hint = NULL;
+          walker_baton->notify_func(rep->revision,
+                                    walker_baton->notify_baton,
+                                    scratch_pool);
+          walker_baton->last_notified_revision = rep->revision;
         }
 
-      /* access the repo data */
-      previous_file = walker_baton->hint;
-      SVN_ERR(svn_fs_fs__check_rep(rep, fs, &walker_baton->hint,
-                                   walker_baton->pool));
-
-      /* update resource usage counters */
-      walker_baton->iteration_count++;
-      if (previous_file != walker_baton->hint)
-        walker_baton->file_count++;
-    }
-  else
-    {
-      /* ### Should this be using read_rep_line() directly? */
-      SVN_ERR(svn_fs_fs__check_rep(rep, fs, NULL, scratch_pool));
+      svn_pool_clear(walker_baton->pool);
+
+      walker_baton->iteration_count = 0;
+      walker_baton->file_count = 0;
+      walker_baton->hint = NULL;
     }
 
+  /* access the repo data */
+  previous_hint = walker_baton->hint;
+  SVN_ERR(svn_fs_fs__check_rep(rep, fs, &walker_baton->hint,
+                               walker_baton->pool));
+
+  /* update resource usage counters */
+  walker_baton->iteration_count++;
+  if (previous_hint != walker_baton->hint)
+    walker_baton->file_count++;
+
   return SVN_NO_ERROR;
 }
 



Mime
View raw message