You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/06/30 14:29:56 UTC

svn commit: r1498103 - /subversion/branches/fsfs-format7/subversion/libsvn_fs/fs-loader.c

Author: stefan2
Date: Sun Jun 30 12:29:55 2013
New Revision: 1498103

URL: http://svn.apache.org/r1498103
Log:
On the fsfs-format7 branch:  Teach the FS loader to handle an arbitrary
number of modules (instead of just 2).

* subversion/libsvn_fs/fs-loader.c
  (get_library_vtable): iterate over all module declarations

Modified:
    subversion/branches/fsfs-format7/subversion/libsvn_fs/fs-loader.c

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs/fs-loader.c?rev=1498103&r1=1498102&r2=1498103&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs/fs-loader.c Sun Jun 30 12:29:55 2013
@@ -221,21 +221,16 @@ static svn_error_t *
 get_library_vtable(fs_library_vtable_t **vtable, const char *fs_type,
                    apr_pool_t *pool)
 {
-  struct fs_type_defn **fst = &fs_modules;
+  struct fs_type_defn **fst;
   svn_boolean_t known = FALSE;
 
   /* There are two FS module definitions known at compile time.  We
      want to check these without any locking overhead even when
      dynamic third party modules are enabled.  The third party modules
      cannot be checked until the lock is held.  */
-  if (strcmp(fs_type, (*fst)->fs_type) == 0)
-    known = TRUE;
-  else
-    {
-      fst = &(*fst)->next;
-      if (strcmp(fs_type, (*fst)->fs_type) == 0)
-        known = TRUE;
-    }
+  for (fst = &fs_modules; *fst && !known; fst = &(*fst)->next)
+    if (strcmp(fs_type, (*fst)->fs_type) == 0)
+      known = TRUE;
 
 #if defined(SVN_USE_DSO) && APR_HAS_DSO
   /* Third party FS modules that are unknown at compile time.