aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/mangle.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2001-09-15 14:04:47 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2001-09-15 14:04:47 +0000
commitcb6edbcb190c1d42e02deae9532e24e059742f32 (patch)
tree45aae5c4dc09289e3c64fd42746ee1cea71aa7be /gcc/cp/mangle.c
parent461c166993aa3bb3022e90451bbadcd24a0d1531 (diff)
downloadgcc-cb6edbcb190c1d42e02deae9532e24e059742f32.zip
gcc-cb6edbcb190c1d42e02deae9532e24e059742f32.tar.gz
gcc-cb6edbcb190c1d42e02deae9532e24e059742f32.tar.bz2
collect2.c (main): Const-ification.
* collect2.c (main): Const-ification. * gcc.c (translate_options, process_command): Use xstrdup in lieu of xmalloc/strcpy. (main): Use concat in lieu of xmalloc/strcpy/strcat. cp: * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of xmalloc/strcpy/strcat. From-SVN: r45631
Diffstat (limited to 'gcc/cp/mangle.c')
-rw-r--r--gcc/cp/mangle.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index 6e94681..6ad9ffa 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -2392,11 +2392,7 @@ mangle_conv_op_name_for_type (type)
/* Build the mangling for TYPE. */
const char *mangled_type = mangle_type_string (type);
/* Allocate a temporary buffer for the complete name. */
- char *op_name = (char *) xmalloc (strlen ("operator ")
- + strlen (mangled_type) + 1);
- /* Assemble the mangling. */
- strcpy (op_name, "operator ");
- strcat (op_name, mangled_type);
+ char *op_name = concat ("operator ", mangled_type, NULL);
/* Find or create an identifier. */
identifier = get_identifier (op_name);
/* Done with the temporary buffer. */