aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-rdp.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-03-20 01:37:10 +0000
committerAndrew Cagney <cagney@redhat.com>2001-03-20 01:37:10 +0000
commit3c37485b16d873d9fd8d5d448dce60a2d890e286 (patch)
tree01b974afe0c43b13dc0a0efda5ce8f0cf4b1a6a4 /gdb/remote-rdp.c
parent0e52036f1f47078a9863f6a377ff11e10a81e8c4 (diff)
downloadgdb-3c37485b16d873d9fd8d5d448dce60a2d890e286.zip
gdb-3c37485b16d873d9fd8d5d448dce60a2d890e286.tar.gz
gdb-3c37485b16d873d9fd8d5d448dce60a2d890e286.tar.bz2
malloc() -> xmalloc.
Move malloc() decl to utils.c
Diffstat (limited to 'gdb/remote-rdp.c')
-rw-r--r--gdb/remote-rdp.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/gdb/remote-rdp.c b/gdb/remote-rdp.c
index e9002de..1c9b3c3 100644
--- a/gdb/remote-rdp.c
+++ b/gdb/remote-rdp.c
@@ -699,13 +699,7 @@ rdp_set_command_line (char *command, char *args)
if (commandline != NULL)
xfree (commandline);
- commandline = malloc (strlen (command) + strlen (args) + 2);
- if (commandline != NULL)
- {
- strcpy (commandline, command);
- strcat (commandline, " ");
- strcat (commandline, args);
- }
+ xasprintf (&commandline, %s %s", command, args);
}
static void