[tor-commits] [tor/master] test_options: remove def_opt member of test data.

teor at torproject.org teor at torproject.org
Wed Oct 23 13:00:38 UTC 2019


commit 3656fdae98ff964447a8a8a5cf3d44985e264c7f
Author: Nick Mathewson <nickm at torproject.org>
Date:   Tue Oct 22 14:09:02 2019 -0400

    test_options: remove def_opt member of test data.
---
 src/test/test_options.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/src/test/test_options.c b/src/test/test_options.c
index b90e36c8c..cecb36966 100644
--- a/src/test/test_options.c
+++ b/src/test/test_options.c
@@ -386,7 +386,6 @@ fixed_get_uname(void)
 typedef struct {
   or_options_t *old_opt;
   or_options_t *opt;
-  or_options_t *def_opt;
 } options_test_data_t;
 
 static void free_options_test_data(options_test_data_t *td);
@@ -400,11 +399,9 @@ get_options_test_data(const char *conf)
   options_test_data_t *result = tor_malloc(sizeof(options_test_data_t));
   result->opt = options_new();
   result->old_opt = options_new();
-  result->def_opt = options_new();
 
   options_init(result->opt);
   options_init(result->old_opt);
-  options_init(result->def_opt);
 
   rv = config_get_lines(conf, &cl, 1);
   tt_int_op(rv, OP_EQ, 0);
@@ -419,12 +416,6 @@ get_options_test_data(const char *conf)
   result->opt->TokenBucketRefillInterval = 1;
   rv = config_get_lines("", &cl, 1);
   tt_int_op(rv, OP_EQ, 0);
-  rv = config_assign(get_options_mgr(), result->def_opt, cl, 0, &msg);
-  if (msg) {
-    /* Display the parse error message by comparing it with an empty string */
-    tt_str_op(msg, OP_EQ, "");
-  }
-  tt_int_op(rv, OP_EQ, 0);
 
  done:
   config_free_lines(cl);
@@ -444,7 +435,6 @@ free_options_test_data(options_test_data_t *td)
   if (!td) return;
   or_options_free(td->old_opt);
   or_options_free(td->opt);
-  or_options_free(td->def_opt);
   tor_free(td);
 }
 





More information about the tor-commits mailing list