[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] test_options: remove "dflt" part of setup_options().



commit 86a1d670acd053d1cab3ac4ff74669bcecc5c1ac
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue Oct 22 14:07:32 2019 -0400

    test_options: remove "dflt" part of setup_options().
    
    It is no longer used anywhere.
---
 src/test/test_options.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/src/test/test_options.c b/src/test/test_options.c
index f8ad2cbda..b90e36c8c 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;



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits