Commit da7ac8f1 by Gabriel Dos Reis Committed by Gabriel Dos Reis

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

From-SVN: r53869
parent 5e56e70a
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> 2002-05-24 Zack Weinberg <zack@codesourcery.com>
* config.gcc: Remove all stanzas for previously obsoleted * config.gcc: Remove all stanzas for previously obsoleted
......
/* Top level of GNU C compiler /* Top level of GNU C compiler
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002 Free Software Foundation, Inc. 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
...@@ -1718,13 +1719,12 @@ output_clean_symbol_name (file, name) ...@@ -1718,13 +1719,12 @@ output_clean_symbol_name (file, name)
const char *name; const char *name;
{ {
/* Make a copy of NAME. */ /* Make a copy of NAME. */
char *id = (char *)xmalloc (strlen (name) + 1); char *id = xstrdup (name);
strcpy (id, name);
/* Make it look like a valid identifier for an assembler. */ /* Make it look like a valid identifier for an assembler. */
clean_symbol_name (id); clean_symbol_name (id);
fputs (file, name); fputs (name, file);
free (id); free (id);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment