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:
parent
54693cf5f1
commit
b9671caf8f
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue