diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 1999-09-15 14:18:33 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 1999-09-15 14:18:33 +0000 |
commit | 23fb21ff10deb6f32e430d9924c30b14a2d3a022 (patch) | |
tree | 6ae1185c7633d13ac08125fd2d068d1fd14e877d /gcc | |
parent | c1b59dce97f012deee1628e3da980c4287ef5d3d (diff) | |
download | gcc-23fb21ff10deb6f32e430d9924c30b14a2d3a022.zip gcc-23fb21ff10deb6f32e430d9924c30b14a2d3a022.tar.gz gcc-23fb21ff10deb6f32e430d9924c30b14a2d3a022.tar.bz2 |
* actions.c (warn_unhandled): Use xstrdup, not xmalloc/strcpy.
From-SVN: r29435
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ch/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ch/actions.c | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ch/ChangeLog b/gcc/ch/ChangeLog index 2790e5e..a39ab98 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 e121cb4..de6087c 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); } |