summaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorgdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-25 14:38:42 +0000
committergdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-25 14:38:42 +0000
commit0b24eca66a8c6532cc3fc38162eb2dabbcac591b (patch)
tree96a70f3e06f2f775e072df156ac710be8f10c37c /gcc/toplev.c
parentab87caeb541808c4ec2c1cf1da92393620e1afde (diff)
downloadgcc-0b24eca66a8c6532cc3fc38162eb2dabbcac591b.tar.gz
* toplev.c (output_clean_symbol_name): Use xstrdup. Fix thinko.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53869 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index b0c1d4049da..c12675e9895 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1,3 +1,4 @@
+
/* Top level of GNU C compiler
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002 Free Software Foundation, Inc.
@@ -1718,13 +1719,12 @@ output_clean_symbol_name (file, name)
const char *name;
{
/* Make a copy of NAME. */
- char *id = (char *)xmalloc (strlen (name) + 1);
- strcpy (id, name);
+ char *id = xstrdup (name);
/* Make it look like a valid identifier for an assembler. */
clean_symbol_name (id);
- fputs (file, name);
+ fputs (name, file);
free (id);
}