summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gcc/ch/ChangeLog4
-rw-r--r--gcc/ch/actions.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ch/ChangeLog b/gcc/ch/ChangeLog
index 2790e5e78a1..a39ab98c7e2 100644
--- a/gcc/ch/ChangeLog
+++ b/gcc/ch/ChangeLog
@@ -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
diff --git a/gcc/ch/actions.c b/gcc/ch/actions.c
index e121cb441f9..de6087c4299 100644
--- a/gcc/ch/actions.c
+++ b/gcc/ch/actions.c
@@ -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);
}
OpenPOWER on IntegriCloud