aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_options.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-10-22 14:07:32 -0400
committerNick Mathewson <nickm@torproject.org>2019-10-22 14:24:09 -0400
commit86a1d670acd053d1cab3ac4ff74669bcecc5c1ac (patch)
tree38dca2499ea2db871f956b7bf4761e929f631672 /src/test/test_options.c
parent475a1dc9be40b95922a45227ac03683914ceeea8 (diff)
downloadtor-86a1d670acd053d1cab3ac4ff74669bcecc5c1ac.tar.gz
tor-86a1d670acd053d1cab3ac4ff74669bcecc5c1ac.zip
test_options: remove "dflt" part of setup_options().
It is no longer used anywhere.
Diffstat (limited to 'src/test/test_options.c')
-rw-r--r--src/test/test_options.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/test/test_options.c b/src/test/test_options.c
index f8ad2cbdaf..b90e36c8c6 100644
--- a/src/test/test_options.c
+++ b/src/test/test_options.c
@@ -92,14 +92,11 @@ clear_log_messages(void)
messages = NULL;
}
-#define setup_options(opt,dflt) \
+#define setup_options(opt) \
do { \
opt = options_new(); \
opt->command = CMD_RUN_TOR; \
options_init(opt); \
- \
- dflt = config_dup(get_options_mgr(), opt); \
- clear_log_messages(); \
} while (0)
#define VALID_DIR_AUTH "DirAuthority dizum orport=443 v3ident=E8A9C45" \
@@ -181,12 +178,11 @@ test_options_validate_impl(const char *configuration,
int phase)
{
or_options_t *opt=NULL;
- or_options_t *dflt;
config_line_t *cl=NULL;
char *msg=NULL;
int r;
- setup_options(opt, dflt);
+ setup_options(opt);
r = config_get_lines(configuration, &cl, 1);
if (phase == PH_GETLINES) {
@@ -223,7 +219,6 @@ test_options_validate_impl(const char *configuration,
policies_free_all();
config_free_lines(cl);
or_options_free(opt);
- or_options_free(dflt);
tor_free(msg);
clear_log_messages();
}
@@ -295,15 +290,13 @@ test_have_enough_mem_for_dircache(void *arg)
{
(void)arg;
or_options_t *opt=NULL;
- or_options_t *dflt=NULL;
config_line_t *cl=NULL;
char *msg=NULL;
int r;
const char *configuration = "ORPort 8080\nDirCache 1", *expect_errmsg;
- setup_options(opt, dflt);
+ setup_options(opt);
setup_log_callback();
- (void)dflt;
r = config_get_lines(configuration, &cl, 1);
tt_int_op(r, OP_EQ, 0);
@@ -377,7 +370,6 @@ test_have_enough_mem_for_dircache(void *arg)
done:
if (msg)
tor_free(msg);
- or_options_free(dflt);
or_options_free(opt);
config_free_lines(cl);
return;