aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2018-03-02 23:27:46 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2018-03-02 23:27:47 -0500
commitb9671caf8fe1abd737846edf7dcd627870f986cc (patch)
tree3bfba12e9cb6a97cc08ef47b12300ac17e982129 /gdb/gdbserver
parent54693cf5f11bf292ae308604caf6e866dbb03e6f (diff)
downloadgdb-b9671caf8fe1abd737846edf7dcd627870f986cc.zip
gdb-b9671caf8fe1abd737846edf7dcd627870f986cc.tar.gz
gdb-b9671caf8fe1abd737846edf7dcd627870f986cc.tar.bz2
handle_general_set: Remove useless xstrdup
Unless I'm missing something very obvious, this xstrdup seems unnecessary to me. We can pass "mode" directly to sprintf. gdb/gdbserver/ChangeLog: * server.c (handle_general_set): Remove unnecessary xstrdup.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog4
-rw-r--r--gdb/gdbserver/server.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 70a9387..f7de928 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,9 @@
2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
+ * server.c (handle_general_set): Remove unnecessary xstrdup.
+
+2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
+
* server.c (parse_debug_format_options): Adjust to
delim_string_to_char_ptr_vec changes.
* thread-db.c (thread_db_load_search): Adjust to
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index afdd504..64c72bd 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -847,12 +847,9 @@ handle_general_set (char *own_buf)
req = TRIBOOL_TRUE;
else
{
- char *mode_copy = xstrdup (mode);
-
/* We don't know what this mode is, so complain to GDB. */
sprintf (own_buf, "E.Unknown thread-events mode requested: %s\n",
- mode_copy);
- xfree (mode_copy);
+ mode);
return;
}