From 3327a0a61cfaca07c3c20533d23a2599735e094f Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Mon, 3 Sep 2012 14:45:24 +0200 Subject: Rename config_alloc() --> _new(). --- src/or/config.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/or/config.c b/src/or/config.c index c6a4fe430..2403db686 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 options 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); } -- cgit v1.2.3