OSDN Git Service

* actions.c (warn_unhandled): Use xstrdup, not xmalloc/strcpy.
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Sep 1999 14:18:33 +0000 (14:18 +0000)
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Sep 1999 14:18:33 +0000 (14:18 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29435 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 2790e5e..a39ab98 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 e121cb4..de6087c 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);
 }