Author: petdance
Date: Sun Dec 21 22:16:43 2008
New Revision: 34234
Modified:
trunk/compilers/imcc/parser_util.c
Log:
Combined a strcpy/strlen together
Modified: trunk/compilers/imcc/parser_util.c
==============================================================================
--- trunk/compilers/imcc/parser_util.c (original)
+++ trunk/compilers/imcc/parser_util.c Sun Dec 21 22:16:43 2008
@@ -184,15 +184,15 @@
ARGIN(SymReg * const *args), int narg, int keyvec)
{
int i;
+ const size_t namelen = strlen(name);
#if IMC_TRACE_HIGH
- char *full = dest;
+ const char * const full = dest;
Parrot_io_eprintf(NULL, "op %s", name);
#endif
- strcpy(dest, name);
-
- dest += strlen(name);
+ memcpy(dest, name, namelen+1);
+ dest += namelen;
for (i = 0; i < narg && args[i]; i++) {
*dest++ = '_';