Move savestring to common/common-utils.c, make gdbserver use it.
[deliverable/binutils-gdb.git] / gdb / utils.c
index 408c6ce0888a1e12605a6500e8140a5c612f3f7f..eb99f4b161ea086b4a1173064979d1b8180c03ca 100644 (file)
@@ -89,9 +89,6 @@ extern PTR realloc ();                /* ARI: PTR */
 extern void free ();
 #endif
 
-/* readline defines this.  */
-#undef savestring
-
 void (*deprecated_error_begin_hook) (void);
 
 /* Prototypes for local functions */
@@ -1186,20 +1183,6 @@ myread (int desc, char *addr, int len)
   return orglen;
 }
 
-/* Make a copy of the string at PTR with LEN characters
-   (and add a null character at the end in the copy).
-   Uses malloc to get the space.  Returns the address of the copy.  */
-
-char *
-savestring (const char *ptr, size_t len)
-{
-  char *p = (char *) xmalloc (len + 1);
-
-  memcpy (p, ptr, len);
-  p[len] = 0;
-  return p;
-}
-
 void
 print_spaces (int n, struct ui_file *file)
 {
This page took 0.026666 seconds and 4 git commands to generate.