You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2014/04/29 16:24:12 UTC

svn commit: r1590991 - /subversion/trunk/subversion/libsvn_subr/config.c

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;
 }