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
2 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue