subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1590991 - /subversion/trunk/subversion/libsvn_subr/config.c
Date Tue, 29 Apr 2014 14:24:12 GMT
Author: philip
Date: Tue Apr 29 14:24:11 2014
New Revision: 1590991

URL: http://svn.apache.org/r1590991
Log:
* subversion/libsvn_subr/config.c
  (svn_config_get_config): Remove some ugly pre-processor code and use
   our convenience function instead.

Modified:
    subversion/trunk/subversion/libsvn_subr/config.c

Modified: subversion/trunk/subversion/libsvn_subr/config.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/config.c?rev=1590991&r1=1590990&r2=1590991&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/config.c (original)
+++ subversion/trunk/subversion/libsvn_subr/config.c Tue Apr 29 14:24:11 2014
@@ -296,19 +296,15 @@ svn_config_get_config(apr_hash_t **cfg_h
   svn_config_t *cfg;
   *cfg_hash = apr_hash_make(pool);
 
-#define CATLEN (sizeof(SVN_CONFIG_CATEGORY_SERVERS) - 1)
   SVN_ERR(get_category_config(&cfg, config_dir, SVN_CONFIG_CATEGORY_SERVERS,
                               pool));
   if (cfg)
-    apr_hash_set(*cfg_hash, SVN_CONFIG_CATEGORY_SERVERS, CATLEN, cfg);
-#undef CATLEN
+    svn_hash_sets(*cfg_hash, SVN_CONFIG_CATEGORY_SERVERS, cfg);
 
-#define CATLEN (sizeof(SVN_CONFIG_CATEGORY_CONFIG) - 1)
   SVN_ERR(get_category_config(&cfg, config_dir, SVN_CONFIG_CATEGORY_CONFIG,
                               pool));
   if (cfg)
-    apr_hash_set(*cfg_hash, SVN_CONFIG_CATEGORY_CONFIG, CATLEN, cfg);
-#undef CATLEN
+    svn_hash_sets(*cfg_hash, SVN_CONFIG_CATEGORY_CONFIG, cfg);
 
   return SVN_NO_ERROR;
 }



Mime
View raw message