Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed unnecessary cast. Localized a loop variable.

  • Loading branch information...
commit 28e0dd30d6d8ceb84eff7bb05c8e139def23218a 1 parent 5de6147
@petdance petdance authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/hash.c
View
5 src/hash.c
@@ -224,10 +224,11 @@ Parrot_hash_pointer(ARGIN_NULLOK(const void * const p), size_t hashval)
{
unsigned char *c = (unsigned char *)&hashval;
- unsigned int i, j;
+ unsigned int i;
for (i = 0; i < sizeof hashval; i++) {
/* swap bitsex of every byte */
unsigned char tmp = 0;
+ unsigned int j;
for (j = 0; j < CHAR_BIT; j++)
tmp |= (0x1 & c[i] >> j) << (CHAR_BIT - j - 1);
c[i] = tmp;
@@ -1629,7 +1630,7 @@ Parrot_hash_clone_prunable(PARROT_INTERP, ARGIN(const Hash *hash),
case enum_type_undef:
case enum_type_ptr:
case enum_type_INTVAL:
- valtmp = (void *)_bucket->value;
+ valtmp = _bucket->value;
break;
default:
Please sign in to comment.
Something went wrong with that request. Please try again.