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.
This commit is contained in:
Simon Marchi 2018-03-02 23:27:46 -05:00
parent 54693cf5f1
commit b9671caf8f
2 changed files with 5 additions and 4 deletions

View File

@ -1,3 +1,7 @@
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

View File

@ -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;
}