Commit 23fb21ff by Kaveh R. Ghazi Committed by Kaveh Ghazi

* actions.c (warn_unhandled): Use xstrdup, not xmalloc/strcpy.

From-SVN: r29435
parent c1b59dce
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> 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 * ch-tree.h: Delete declarations for all tree nodes now moved to
......
...@@ -293,8 +293,7 @@ warn_unhandled (ex) ...@@ -293,8 +293,7 @@ warn_unhandled (ex)
/* not yet warned */ /* not yet warned */
p = (struct already_type *)xmalloc (sizeof (struct already_type)); p = (struct already_type *)xmalloc (sizeof (struct already_type));
p->next = already_warned; p->next = already_warned;
p->name = (char *)xmalloc (strlen (ex) + 1); p->name = xstrdup (ex);
strcpy (p->name, ex);
already_warned = p; already_warned = p;
pedwarn ("causing unhandled exception `%s' (this is flaged only once)", ex); pedwarn ("causing unhandled exception `%s' (this is flaged only once)", ex);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment