projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
117e35f
)
gdb: remove unexpected xstrdup in _initialize_maint_test_settings
author
Simon Marchi
<simon.marchi@polymtl.ca>
Thu, 2 Dec 2021 19:12:44 +0000
(14:12 -0500)
committer
Simon Marchi
<simon.marchi@polymtl.ca>
Thu, 2 Dec 2021 19:14:01 +0000
(14:14 -0500)
That xstrdup is not correct, since we are assigning an std::string. The
result of xstrdup is used to initialize the string, and then lost
forever. Remove it.
Change-Id: Ief7771055e4bfd643ef3b285ec9fb7b1bfd14335
gdb/maint-test-settings.c
patch
|
blob
|
history
diff --git
a/gdb/maint-test-settings.c
b/gdb/maint-test-settings.c
index 9f50088833ab147d0f7d912f4c84eaf9d6329a51..ae61caa0391f704112fb89dab749063d23d7903a 100644
(file)
--- a/
gdb/maint-test-settings.c
+++ b/
gdb/maint-test-settings.c
@@
-83,7
+83,7
@@
void _initialize_maint_test_settings ();
void
_initialize_maint_test_settings ()
{
- maintenance_test_settings_filename =
xstrdup ("/foo/bar")
;
+ maintenance_test_settings_filename =
"/foo/bar"
;
add_setshow_prefix_cmd ("test-settings", class_maintenance,
_("\