summaryrefslogtreecommitdiff
path: root/gdb/cli/cli-setshow.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2009-05-23 16:17:12 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2009-05-23 16:17:12 +0000
commite1e21f169b161d369fd4e7efdbc0cfd8ef400a3c (patch)
tree6b07c4e533b2b0f314b420af0234e991abcde7f5 /gdb/cli/cli-setshow.c
parentd2c669a64ec325aebcade83e85e1a7af28091337 (diff)
downloadgdb-e1e21f169b161d369fd4e7efdbc0cfd8ef400a3c.tar.gz
gdb/
Replace the savestring calls by xstrdup calls where possible. * breakpoint.c (condition_command, set_raw_breakpoint) (create_catchpoint, update_breakpoint_locations): Replace the savestring calls by xstrdup calls where possible. * buildsym.c (start_subfile, patch_subfile_names, record_debugformat) (record_producer): Likewise. * coffread.c (coff_start_symtab, complete_symtab): Likewise. * corefile.c (set_gnutarget): Likewise. * dbxread.c (add_new_header_file): Likewise. * demangle.c (set_demangling_command, set_demangling_style): Likewise. * event-top.c (push_prompt, pop_prompt, command_line_handler) (set_async_prompt): Likewise. * infcmd.c (set_inferior_io_terminal, attach_command_post_wait): Likewise. * language.c (set_language_command, _initialize_language): Likewise. * linespec.c (decode_line_2): Likewise. * rs6000-nat.c (add_vmap): Likewise. * top.c (set_prompt, init_history, init_main): Likewise. * tracepoint.c (stringify_collection_list): Likewise. * varobj.c (varobj_create): Remove variable expr_len. Replace the savestring calls by xstrdup calls where possible. (value_of_root, c_name_of_variable, c_describe_child): Replace the savestring calls by xstrdup calls where possible. * xcoffread.c (complete_symtab): Likewise. * cli/cli-script.c (build_command_line, define_command): Likewise. * cli/cli-setshow.c (do_setshow_command): Likewise.
Diffstat (limited to 'gdb/cli/cli-setshow.c')
-rw-r--r--gdb/cli/cli-setshow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index 206a55d8f0b..851f042b6c3 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -177,14 +177,14 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
arg = "";
if (*(char **) c->var != NULL)
xfree (*(char **) c->var);
- *(char **) c->var = savestring (arg, strlen (arg));
+ *(char **) c->var = xstrdup (arg);
break;
case var_optional_filename:
if (arg == NULL)
arg = "";
if (*(char **) c->var != NULL)
xfree (*(char **) c->var);
- *(char **) c->var = savestring (arg, strlen (arg));
+ *(char **) c->var = xstrdup (arg);
break;
case var_filename:
if (arg == NULL)