From: Kaveh R. Ghazi Date: Wed, 15 Sep 1999 14:18:33 +0000 (+0000) Subject: * actions.c (warn_unhandled): Use xstrdup, not xmalloc/strcpy. X-Git-Tag: prereleases/libstdc++-2.92~10582 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=23fb21ff10deb6f32e430d9924c30b14a2d3a022;p=thirdparty%2Fgcc.git * actions.c (warn_unhandled): Use xstrdup, not xmalloc/strcpy. From-SVN: r29435 --- diff --git a/gcc/ch/ChangeLog b/gcc/ch/ChangeLog index 2790e5e78a1f..a39ab98c7e23 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 e121cb441f99..de6087c42996 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); }