From 23fb21ff10deb6f32e430d9924c30b14a2d3a022 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Wed, 15 Sep 1999 14:18:33 +0000 Subject: [PATCH] * actions.c (warn_unhandled): Use xstrdup, not xmalloc/strcpy. From-SVN: r29435 --- gcc/ch/ChangeLog | 4 ++++ gcc/ch/actions.c | 3 +-- 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 + + * actions.c (warn_unhandled): Use xstrdup, not xmalloc/strcpy. + Fri Sep 10 10:32:32 1999 Bernd Schmidt * 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); } -- 2.30.2