Author: petdance
Date: Thu Jan  8 23:16:09 2009
New Revision: 35247

Modified:
   trunk/compilers/imcc/pbc.c

Log:
consting, and using strcat the way it should be.

Modified: trunk/compilers/imcc/pbc.c
==============================================================================
--- trunk/compilers/imcc/pbc.c  (original)
+++ trunk/compilers/imcc/pbc.c  Thu Jan  8 23:16:09 2009
@@ -2169,9 +2169,9 @@
         /* Add annotations seg if we're missing one. */
         if (!interp->code->annotations) {
             /* Create segment. */
-            char *name = mem_sys_allocate(strlen(interp->code->base.name) + 5);
+            char * const name = 
mem_sys_allocate(strlen(interp->code->base.name) + 5);
             strcpy(name, interp->code->base.name);
-            strcpy(name + strlen(name), "_ANN");
+            strcat(name, "_ANN");
             interp->code->annotations = PackFile_Segment_new_seg(interp, 
interp->code->base.dir,
                     PF_ANNOTATIONS_SEG, name, 1);
             interp->code->annotations->code = interp->code;

Reply via email to