[tor-commits] [tor/master] Rename config_alloc() --> _new().

nickm at torproject.org nickm at torproject.org
Thu Sep 6 15:39:04 UTC 2012


commit 3327a0a61cfaca07c3c20533d23a2599735e094f
Author: Linus Nordberg <linus at torproject.org>
Date:   Mon Sep 3 14:45:24 2012 +0200

    Rename config_alloc() --> _new().
---
 src/or/config.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/or/config.c b/src/or/config.c
index c6a4fe4..2403db6 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -718,7 +718,7 @@ get_dirportfrontpage(void)
 
 /** Allocate an empty configuration object of a given format type. */
 static void *
-config_alloc(const config_format_t *fmt)
+config_new(const config_format_t *fmt)
 {
   void *opts = tor_malloc_zero(fmt->size);
   *(uint32_t*)STRUCT_VAR_P(opts, fmt->magic_offset) = fmt->magic;
@@ -3118,7 +3118,7 @@ options_dup(const config_format_t *fmt, const or_options_t *old)
   int i;
   config_line_t *line;
 
-  newopts = config_alloc(fmt);
+  newopts = config_new(fmt);
   for (i=0; fmt->vars[i].name; ++i) {
     if (fmt->vars[i].type == CONFIG_TYPE_LINELIST_S)
       continue;
@@ -3143,7 +3143,7 @@ options_dup(const config_format_t *fmt, const or_options_t *old)
 or_options_t *
 options_new(void)
 {
-  return config_alloc(&options_format);
+  return config_new(&options_format);
 }
 
 /** Set <b>options</b> to hold reasonable defaults for most options.
@@ -3189,7 +3189,7 @@ config_dump(const config_format_t *fmt, const void *default_options,
   char *msg = NULL;
 
   if (defaults == NULL) {
-    defaults = defaults_tmp = config_alloc(fmt);
+    defaults = defaults_tmp = config_new(fmt);
     config_init(fmt, defaults_tmp);
   }
 





More information about the tor-commits mailing list