mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 13:56:22 +08:00
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:
@ -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>
|
2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
* server.c (parse_debug_format_options): Adjust to
|
* server.c (parse_debug_format_options): Adjust to
|
||||||
|
@ -847,12 +847,9 @@ handle_general_set (char *own_buf)
|
|||||||
req = TRIBOOL_TRUE;
|
req = TRIBOOL_TRUE;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *mode_copy = xstrdup (mode);
|
|
||||||
|
|
||||||
/* We don't know what this mode is, so complain to GDB. */
|
/* We don't know what this mode is, so complain to GDB. */
|
||||||
sprintf (own_buf, "E.Unknown thread-events mode requested: %s\n",
|
sprintf (own_buf, "E.Unknown thread-events mode requested: %s\n",
|
||||||
mode_copy);
|
mode);
|
||||||
xfree (mode_copy);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user