[prev in list] [next in list] [prev in thread] [next in thread] 

List:       subversion-commits
Subject:    svn commit: r1498103 - /subversion/branches/fsfs-format7/subversion/libsvn_fs/fs-loader.c
From:       stefan2 () apache ! org
Date:       2013-06-30 12:29:56
Message-ID: 20130630122956.36C1E238889B () eris ! apache ! org
[Download RAW message or body]

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.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic