From 1dcd444b7e319963e35b806639bb38d8d0371fd4 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Tue, 30 Jul 2002 02:24:17 +0000 Subject: adadecode.c (ada_demangle): Use xstrdup in lieu of xmalloc/strcpy. 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. From-SVN: r55861 --- gcc/cppfiles.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'gcc/cppfiles.c') diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index 903e02d..653b33e 100644 --- a/gcc/cppfiles.c +++ b/gcc/cppfiles.c @@ -908,7 +908,6 @@ read_name_map (pfile, dirname) if (f) { int ch; - int dirlen = strlen (dirname); while ((ch = getc (f)) != EOF) { @@ -931,10 +930,7 @@ read_name_map (pfile, dirname) ptr->map_to = to; else { - ptr->map_to = xmalloc (dirlen + strlen (to) + 2); - strcpy (ptr->map_to, dirname); - ptr->map_to[dirlen] = '/'; - strcpy (ptr->map_to + dirlen + 1, to); + ptr->map_to = concat (dirname, "/", to, NULL); free (to); } -- cgit v1.1