* actions.c (warn_unhandled): Use xstrdup, not xmalloc/strcpy.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Wed, 15 Sep 1999 14:18:33 +0000 (14:18 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Wed, 15 Sep 1999 14:18:33 +0000 (14:18 +0000)
From-SVN: r29435

gcc/ch/ChangeLog
gcc/ch/actions.c

index 2790e5e78a1f32c5b5457dd32cc97598bdd8ca61..a39ab98c7e23662d06937c2b89f029a1c7db92d4 100644 (file)
@@ -1,3 +1,7 @@
+1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * actions.c (warn_unhandled): Use xstrdup, not xmalloc/strcpy.
+
 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
 
        * ch-tree.h: Delete declarations for all tree nodes now moved to
index e121cb441f99463fc2efc81d046599f3dffabbc9..de6087c4299613faa4b95e50a9ab4f2c6449288a 100644 (file)
@@ -293,8 +293,7 @@ warn_unhandled (ex)
   /* not yet warned */
   p = (struct already_type *)xmalloc (sizeof (struct already_type));
   p->next = already_warned;
-  p->name = (char *)xmalloc (strlen (ex) + 1);
-  strcpy (p->name, ex);
+  p->name = xstrdup (ex);
   already_warned = p;
   pedwarn ("causing unhandled exception `%s' (this is flaged only once)", ex);
 }