* toplev.c (output_clean_symbol_name): Use xstrdup. Fix thinko.

From-SVN: r53869
This commit is contained in:
Gabriel Dos Reis 2002-05-25 14:38:42 +00:00 committed by Gabriel Dos Reis
parent 5e56e70a02
commit da7ac8f11b
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2002-05-25 Gabriel Dos Reis <gdr@codesourcery.com>
* toplev.c (output_clean_symbol_name): Use xstrdup. Fix thinko.
2002-05-24 Zack Weinberg <zack@codesourcery.com>
* config.gcc: Remove all stanzas for previously obsoleted

View File

@ -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);
}