summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@torproject.org>2012-09-03 14:45:24 +0200
committerNick Mathewson <nickm@torproject.org>2012-09-06 11:37:00 -0400
commit3327a0a61cfaca07c3c20533d23a2599735e094f (patch)
tree1ab0aa055c71a28440bda329f330605bb30c3863
parent1ca9e2685f6cea803ff1a36c7dbe05625e9c4b61 (diff)
downloadtor-3327a0a61cfaca07c3c20533d23a2599735e094f.tar.gz
tor-3327a0a61cfaca07c3c20533d23a2599735e094f.zip
Rename config_alloc() --> _new().
-rw-r--r--src/or/config.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/config.c b/src/or/config.c
index c6a4fe4303..2403db686e 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);
}