aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/xref.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1999-09-16 22:33:10 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1999-09-16 22:33:10 +0000
commitfffeac96e0bb41205011e6092116ff91f1049b17 (patch)
treefcba1b144217dee7b96381e6416b164d568678a8 /gcc/cp/xref.c
parent92a438d13c876561ee189d9eb274f2dd8151ac91 (diff)
downloadgcc-fffeac96e0bb41205011e6092116ff91f1049b17.zip
gcc-fffeac96e0bb41205011e6092116ff91f1049b17.tar.gz
gcc-fffeac96e0bb41205011e6092116ff91f1049b17.tar.bz2
lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
* lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero. * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy. From-SVN: r29464
Diffstat (limited to 'gcc/cp/xref.c')
-rw-r--r--gcc/cp/xref.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/cp/xref.c b/gcc/cp/xref.c
index cd6cb85..5c6e7b7 100644
--- a/gcc/cp/xref.c
+++ b/gcc/cp/xref.c
@@ -60,9 +60,7 @@ int flag_gnu_xref;
/* Return a malloc'd copy of STR. */
-#define SALLOC(str) \
- ((char *) ((str) == NULL ? NULL \
- : (char *) strcpy ((char *) xmalloc (strlen ((str)) + 1), (str))))
+#define SALLOC(str) ((char *) ((str) == NULL ? NULL : xstrdup (str)))
#define SFREE(str) (str != NULL && (free(str),0))
#define STREQL(s1,s2) (strcmp((s1),(s2)) == 0)