Replace strsave() with xstrdup().

This commit is contained in:
Andrew Cagney
2001-01-31 01:24:03 +00:00
parent e191e0abe5
commit 4fcf66da88
19 changed files with 80 additions and 64 deletions

View File

@ -1,5 +1,5 @@
/* General utility routines for GDB, the GNU debugger.
Copyright 1986, 1989, 1990-1992, 1995, 1996, 1998, 2000
Copyright 1986, 1989, 1990-1992, 1995, 1996, 1998, 2000, 2001
Free Software Foundation, Inc.
This file is part of GDB.
@ -1162,15 +1162,6 @@ msavestring (void *md, const char *ptr, int size)
return p;
}
/* The "const" is so it compiles under DGUX (which prototypes strsave
in <string.h>. FIXME: This should be named "xstrsave", shouldn't it?
Doesn't real strsave return NULL if out of memory? */
char *
strsave (const char *ptr)
{
return savestring (ptr, strlen (ptr));
}
char *
mstrsave (void *md, const char *ptr)
{