From: Steven Hugg Date: Mon, 1 Apr 2019 01:39:36 +0000 (-0400) Subject: Code cleanup per code review X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ae261e91f2cce3d828c1df4df5bc1bce72586d1c;p=cc65 Code cleanup per code review --- diff --git a/src/cc65/coptptrload.c b/src/cc65/coptptrload.c index c23858579..0534a1fa2 100644 --- a/src/cc65/coptptrload.c +++ b/src/cc65/coptptrload.c @@ -1633,16 +1633,14 @@ unsigned OptPtrLoad19 (CodeSeg* S) X = NewCodeEntry (OP65_TAY, AM65_IMP, 0, 0, L[2]->LI); CS_InsertEntry (S, X, IP++); - /* allocate Label memory */ - Label = xmalloc (Len); /* lda label,y */ - Label = memcpy (Label, L[4]->Arg+2, Len-3); + /* allocate Label memory */ + Label = memcpy (xmalloc (Len), L[4]->Arg+2, Len-3); Label[Len-3] = '\0'; X = NewCodeEntry (OP65_LDA, AM65_ABSY, Label, 0, L[10]->LI); CS_InsertEntry (S, X, IP++); /* ldx label+1,y */ - Label = memcpy (Label, L[4]->Arg+2, Len-3); strcpy(&Label[Len-3], "+1"); X = NewCodeEntry (OP65_LDX, AM65_ABSY, Label, 0, L[10]->LI); CS_InsertEntry (S, X, IP++);