diff options
Diffstat (limited to 'gcc/dwarfout.c')
-rw-r--r-- | gcc/dwarfout.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c index fbc9f44..90c1502 100644 --- a/gcc/dwarfout.c +++ b/gcc/dwarfout.c @@ -5814,18 +5814,12 @@ dwarfout_init (asm_out_file, main_input_filename) ASM_OUTPUT_PUSH_SECTION (asm_out_file, SFNAMES_SECTION); ASM_OUTPUT_LABEL (asm_out_file, SFNAMES_BEGIN_LABEL); { - register char *pwd; - register unsigned len; + register char *pwd = getpwd (); register char *dirname; - pwd = getpwd (); if (!pwd) pfatal_with_name ("getpwd"); - len = strlen (pwd); - dirname = (char *) xmalloc (len + 2); - - strcpy (dirname, pwd); - strcpy (dirname + len, "/"); + dirname = concat (pwd, "/", NULL); ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, dirname); free (dirname); } |