diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2001-04-23 00:36:28 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2001-04-23 00:36:28 +0000 |
commit | d4c3ec27386c2b61e46604c0674dbb1dac004310 (patch) | |
tree | 790252fc6f2f85414e4da728fab71c76dd6c9020 /gcc/cp/xref.c | |
parent | 2ac8a0f9c2464064ba2eb5cd9d63a4f8d6e3525b (diff) | |
download | gcc-d4c3ec27386c2b61e46604c0674dbb1dac004310.zip gcc-d4c3ec27386c2b61e46604c0674dbb1dac004310.tar.gz gcc-d4c3ec27386c2b61e46604c0674dbb1dac004310.tar.bz2 |
collect2.c (main): Use concat in lieu of xmalloc/sprintf.
* collect2.c (main): Use concat in lieu of xmalloc/sprintf.
(write_c_file_stat): Likewise.
* dbxout.c (dbxout_init): Likewise.
* profile.c (output_func_start_profiler): Likewise.
cp:
* xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
f:
* com.c (ffecom_subscript_check_): Use concat in lieu of
xmalloc/sprintf.
java:
* jvspec.c (lang_specific_driver): Fix memory allocation
deficit, by using concat in lieu of xmalloc/sprintf.
From-SVN: r41495
Diffstat (limited to 'gcc/cp/xref.c')
-rw-r--r-- | gcc/cp/xref.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/gcc/cp/xref.c b/gcc/cp/xref.c index cf99fcd..af35020 100644 --- a/gcc/cp/xref.c +++ b/gcc/cp/xref.c @@ -205,14 +205,7 @@ GNU_xref_file (name) if (FILE_NAME_ABSOLUTE_P (name) || ! wd_name) xf->outname = xf->name; else - { - char *nmbuf - = (char *) xmalloc (strlen (wd_name) + strlen (FILE_NAME_JOINER) - + strlen (name) + 1); - sprintf (nmbuf, "%s%s%s", wd_name, FILE_NAME_JOINER, name); - name = nmbuf; - xf->outname = nmbuf; - } + xf->outname = name = concat (wd_name, FILE_NAME_JOINER, name, NULL); fprintf (xref_file, "FIL %s %s 0\n", name, wd_name); |