From: gdr Date: Sat, 25 May 2002 14:38:42 +0000 (+0000) Subject: * toplev.c (output_clean_symbol_name): Use xstrdup. Fix thinko. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0b24eca66a8c6532cc3fc38162eb2dabbcac591b;p=thirdparty%2Fgcc.git * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 418fb02f39b5..86d94094bcd5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2002-05-25 Gabriel Dos Reis + + * toplev.c (output_clean_symbol_name): Use xstrdup. Fix thinko. + 2002-05-24 Zack Weinberg * config.gcc: Remove all stanzas for previously obsoleted diff --git a/gcc/toplev.c b/gcc/toplev.c index b0c1d4049da9..c12675e9895f 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); }