Fix -Werror -Wuninitialized warnings.
[deliverable/binutils-gdb.git] / gdb / remote-rdp.c
index ccce506537eb203a653a9ae5d1e4d1662c4dcb28..1c9b3c385032abba1bd3358b941fa5b31095330a 100644 (file)
@@ -1,5 +1,6 @@
 /* Remote debugging for the ARM RDP interface.
-   Copyright 1994, 1995, 2001 Free Software Foundation, Inc.
+   Copyright 1994, 1995, 1998, 1999, 2000, 2001
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -38,7 +39,6 @@
 
 #include "defs.h"
 #include "inferior.h"
-#include "gdb_wait.h"
 #include "value.h"
 #include "callback.h"
 #include "command.h"
@@ -48,6 +48,7 @@
 #include "remote-utils.h"
 #include "gdb_string.h"
 #include "gdbcore.h"
+#include "regcache.h"
 
 #ifdef HAVE_TIME_H
 #include <time.h>
@@ -472,13 +473,13 @@ send_rdp (char *template,...)
          *pi = get_byte ();
          break;
        default:
-         abort ();
+         internal_error (__FILE__, __LINE__, "failed internal consistency check");
        }
     }
   va_end (alist);
 
   if (dst != buf)
-    abort ();
+    internal_error (__FILE__, __LINE__, "failed internal consistency check");
 }
 
 
@@ -698,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
This page took 0.024548 seconds and 4 git commands to generate.