Changeset 5007:179d63653e33 in roaraudio


Ignore:
Timestamp:
05/24/11 21:37:05 (11 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

forced size of used ints

Location:
libroar
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libroar/crc.c

    r4795 r5007  
    5050 
    5151 for (; len; len--) { 
    52   state ^= (*p++) << 16; 
     52  state ^= ((uint32_t)(*p++)) << 16; 
    5353  for (i = 0; i < 8; i++) { 
    5454   state <<= 1; 
  • libroar/random.c

    r4785 r5007  
    165165 } 
    166166 
    167  ret  = roar_nonce_pool[sizeof(roar_nonce_pool)-roar_nonce_pool_len+0] <<  0; 
    168  ret |= roar_nonce_pool[sizeof(roar_nonce_pool)-roar_nonce_pool_len+1] <<  8; 
    169  ret |= roar_nonce_pool[sizeof(roar_nonce_pool)-roar_nonce_pool_len+2] << 16; 
    170  ret |= roar_nonce_pool[sizeof(roar_nonce_pool)-roar_nonce_pool_len+3] << 24; 
     167 ret  = (uint32_t)roar_nonce_pool[sizeof(roar_nonce_pool)-roar_nonce_pool_len+0] <<  0; 
     168 ret |= (uint32_t)roar_nonce_pool[sizeof(roar_nonce_pool)-roar_nonce_pool_len+1] <<  8; 
     169 ret |= (uint32_t)roar_nonce_pool[sizeof(roar_nonce_pool)-roar_nonce_pool_len+2] << 16; 
     170 ret |= (uint32_t)roar_nonce_pool[sizeof(roar_nonce_pool)-roar_nonce_pool_len+3] << 24; 
    171171 
    172172 roar_nonce_pool_len -= 4; 
Note: See TracChangeset for help on using the changeset viewer.