diff options
author | Andy Lester <andy@petdance.com> | 2005-06-02 07:19:43 -0500 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-06-03 08:31:26 +0000 |
commit | b464bac0b70c4876af1296864220315edde8461d (patch) | |
tree | 9d2088559b19bbf0fbf64591f1dcd7df4961be5b /malloc.c | |
parent | 2d706fb2bbfd21eac5cd2efc341a42f1caed2490 (diff) | |
download | perl-b464bac0b70c4876af1296864220315edde8461d.tar.gz |
Random consting
Message-ID: <20050602171943.GA16553@petdance.com>
p4raw-id: //depot/perl@24689
Diffstat (limited to 'malloc.c')
-rw-r--r-- | malloc.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1337,7 +1337,7 @@ fill_pat_4bytes(unsigned char *s, size_t nbytes, const unsigned char *fill) { unsigned char *e = s + nbytes; long *lp; - long lfill = *(long*)fill; + const long lfill = *(long*)fill; if (PTR2UV(s) & (sizeof(long)-1)) { /* Align the pattern */ int shift = sizeof(long) - (PTR2UV(s) & (sizeof(long)-1)); @@ -1378,7 +1378,7 @@ cmp_pat_4bytes(unsigned char *s, size_t nbytes, const unsigned char *fill) { unsigned char *e = s + nbytes; long *lp; - long lfill = *(long*)fill; + const long lfill = *(long*)fill; if (PTR2UV(s) & (sizeof(long)-1)) { /* Align the pattern */ int shift = sizeof(long) - (PTR2UV(s) & (sizeof(long)-1)); @@ -2357,12 +2357,12 @@ Perl_malloced_size(void *p) { union overhead *ovp = (union overhead *) ((caddr_t)p - sizeof (union overhead) * CHUNK_SHIFT); - int bucket = OV_INDEX(ovp); + const int bucket = OV_INDEX(ovp); #ifdef RCHECK /* The caller wants to have a complete control over the chunk, disable the memory checking inside the chunk. */ if (bucket <= MAX_SHORT_BUCKET) { - MEM_SIZE size = BUCKET_SIZE_REAL(bucket); + const MEM_SIZE size = BUCKET_SIZE_REAL(bucket); ovp->ov_size = size + M_OVERHEAD - 1; *((u_int *)((caddr_t)ovp + size + M_OVERHEAD - RMAGIC_SZ)) = RMAGIC; } |