summaryrefslogtreecommitdiff
path: root/gcc/ada/adadecode.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-30 02:24:17 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-30 02:24:17 +0000
commit9591cb7b2c0df0b342e99053ba2cea175a27a91e (patch)
tree43e83a07dda5ffa69f8ce439842c421d79dcd252 /gcc/ada/adadecode.c
parent92482ee006f0b625da3a2125075e59d29eef1c17 (diff)
downloadgcc-9591cb7b2c0df0b342e99053ba2cea175a27a91e.tar.gz
ada:
* adadecode.c (ada_demangle): Use xstrdup in lieu of xmalloc/strcpy. * misc.c (gnat_decode_option): Likewise. gcc: * alpha/vms-cc.c (preprocess_args, main): Use xstrdup and/or concat in lieu of xmalloc/strcpy/memcpy/sprintf. * alpha/vms-ld.c (main): Likewise. * dsp16xx.c (double_reg_to_memory): Likewise. * mcore.c (mcore_expand_prolog): Likewise. * cppfiles.c (read_name_map): Likewise. * gensupport.c (process_rtx, identify_predicable_attribute, alter_test_for_insn): Likewise. * vmsdbgout.c (write_rtnbeg, vmsdbgout_init): Likewise. f: * com.c (read_name_map): Use concat in lieu of xmalloc/strcpy. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55861 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/adadecode.c')
-rw-r--r--gcc/ada/adadecode.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gcc/ada/adadecode.c b/gcc/ada/adadecode.c
index 54e38be4ca2..e3ab46d41fc 100644
--- a/gcc/ada/adadecode.c
+++ b/gcc/ada/adadecode.c
@@ -313,12 +313,7 @@ ada_demangle (coded_name)
const char *coded_name;
{
char ada_name[2048];
- char *result;
__gnat_decode (coded_name, ada_name, 0);
-
- result = (char *) xmalloc (strlen (ada_name) + 1);
- strcpy (result, ada_name);
-
- return result;
+ return xstrdup (ada_name);
}