[svn:parrot] r38264 - trunk/src

jkeenan at svn.parrot.org jkeenan at svn.parrot.org
Wed Apr 22 03:23:51 UTC 2009


Author: jkeenan
Date: Wed Apr 22 03:23:46 2009
New Revision: 38264
URL: https://trac.parrot.org/parrot/changeset/38264

Log:
Applying patch submitted by Andy Dougherty in
https://trac.parrot.org/parrot/ticket/254, slightly revised to pass c_parens
coding standard test..

Modified:
   trunk/src/packfile.c

Modified: trunk/src/packfile.c
==============================================================================
--- trunk/src/packfile.c	Wed Apr 22 01:32:49 2009	(r38263)
+++ trunk/src/packfile.c	Wed Apr 22 03:23:46 2009	(r38264)
@@ -1905,7 +1905,7 @@
     TRACE_PRINTF_ALIGN(("-S ALIGN_16: offset=0x%x src=0x%x cursor=0x%x\n",
                         offs, self->pf->src, cursor));
     offs += PAD_16_B(offs);
-    cursor = (const opcode_t *)((const char *)(self->pf->src) + offs);
+    cursor = self->pf->src + offs/(sizeof (opcode_t));
     TRACE_PRINTF_ALIGN(("+S ALIGN_16: offset=0x%x src=0x%x cursor=0x%x\n",
                         offs, self->pf->src, cursor));
     return cursor;
@@ -2099,7 +2099,7 @@
     TRACE_PRINTF_ALIGN(("-ALIGN_16: offset=0x%x src=0x%x cursor=0x%x\n",
                       offs, pf->src, cursor));
     offs += PAD_16_B(offs);
-    cursor = (const opcode_t *)((const char *)(pf->src) + offs);
+    cursor = pf->src + offs/(sizeof (opcode_t));
     TRACE_PRINTF_ALIGN(("+ALIGN_16: offset=0x%x src=0x%x cursor=0x%x\n",
                       offs, pf->src, cursor));
 


More information about the parrot-commits mailing list