]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* toplev.c (output_clean_symbol_name): Use xstrdup. Fix thinko.
authorGabriel Dos Reis <gdr@codesourcery.com>
Sat, 25 May 2002 14:38:42 +0000 (14:38 +0000)
committerGabriel Dos Reis <gdr@gcc.gnu.org>
Sat, 25 May 2002 14:38:42 +0000 (14:38 +0000)
From-SVN: r53869

gcc/ChangeLog
gcc/toplev.c

index 418fb02f39b5528156b7d16559731a2b3813db7b..86d94094bcd53600b2a47402ffc495836f68498e 100644 (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
index b0c1d4049da9bfbdb335c9c1d7177384b103762a..c12675e9895f77548969eaa7637374968f83a184 100644 (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);
 }