diff options
Diffstat (limited to 'gdb/maint-test-options.c')
-rw-r--r-- | gdb/maint-test-options.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/gdb/maint-test-options.c b/gdb/maint-test-options.c index b773e75..77a013d 100644 --- a/gdb/maint-test-options.c +++ b/gdb/maint-test-options.c @@ -133,17 +133,12 @@ struct test_options_opts const char *enum_opt = test_options_enum_values_xxx; unsigned int uint_opt = 0; int zuint_unl_opt = 0; - char *string_opt = nullptr; + std::string string_opt; test_options_opts () = default; DISABLE_COPY_AND_ASSIGN (test_options_opts); - ~test_options_opts () - { - xfree (string_opt); - } - /* Dump the options to FILE. ARGS is the remainder unprocessed arguments. */ void dump (ui_file *file, const char *args) const @@ -162,9 +157,7 @@ struct test_options_opts (zuint_unl_opt == -1 ? "unlimited" : plongest (zuint_unl_opt)), - (string_opt != nullptr - ? string_opt - : ""), + string_opt.c_str (), args); } }; |