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/dbxout.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/dbxout.c')
-rw-r--r-- | gcc/dbxout.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 31c8596..1252e2b 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -395,11 +395,7 @@ dbxout_init (asm_file, input_file_name, syms) #endif { if (!cwd && (cwd = getpwd ()) && (!*cwd || cwd[strlen (cwd) - 1] != '/')) - { - char *wdslash = xmalloc (strlen (cwd) + sizeof (FILE_NAME_JOINER)); - sprintf (wdslash, "%s%s", cwd, FILE_NAME_JOINER); - cwd = wdslash; - } + cwd = concat (cwd, FILE_NAME_JOINER, NULL); if (cwd) { #ifdef DBX_OUTPUT_MAIN_SOURCE_DIRECTORY |