diff options
| author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-15 14:04:47 +0000 |
|---|---|---|
| committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-15 14:04:47 +0000 |
| commit | 479501397830fc36512a0f7401bbc24f335ab7d3 (patch) | |
| tree | 45aae5c4dc09289e3c64fd42746ee1cea71aa7be /gcc/cp/mangle.c | |
| parent | 3de1a9032fed45f9214dc6cd7b21e30fdaa13a4c (diff) | |
| download | ppe42-gcc-479501397830fc36512a0f7401bbc24f335ab7d3.tar.gz ppe42-gcc-479501397830fc36512a0f7401bbc24f335ab7d3.zip | |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45631 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/mangle.c')
| -rw-r--r-- | gcc/cp/mangle.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index 6e94681e51e..6ad9ffa3f26 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. */ |

