You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/06/06 12:01:21 UTC
svn commit: r1490221 -
/subversion/trunk/subversion/libsvn_subr/cache-membuffer.c
Author: stefan2
Date: Thu Jun 6 10:01:20 2013
New Revision: 1490221
URL: http://svn.apache.org/r1490221
Log:
Small compatibility improvement. No functional change.
* subversion/libsvn_subr/cache-membuffer.c
(get_group_index,
combine_key): use APR_UINT64_C() instead of ull suffix
Patch by: joeswatosh
Modified:
subversion/trunk/subversion/libsvn_subr/cache-membuffer.c
Modified: subversion/trunk/subversion/libsvn_subr/cache-membuffer.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/cache-membuffer.c?rev=1490221&r1=1490220&r2=1490221&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/cache-membuffer.c (original)
+++ subversion/trunk/subversion/libsvn_subr/cache-membuffer.c Thu Jun 6 10:01:20 2013
@@ -889,8 +889,9 @@ get_group_index(svn_membuffer_t **cache,
* Since key may not be well-distributed, pre-fold it to a smaller but
* "denser" ranger. The divisors are primes larger than the largest
* counts. */
- *cache = &segment0[(key[1] % 2809637ull) & (segment0->segment_count - 1)];
- return (key[0] % 5030895599ull) % segment0->group_count;
+ *cache = &segment0[(key[1] % APR_UINT64_C(2809637))
+ & (segment0->segment_count - 1)];
+ return (key[0] % APR_UINT64_C(5030895599)) % segment0->group_count;
}
/* Reduce the hit count of ENTRY and update the accumulated hit info
@@ -2246,7 +2247,7 @@ combine_key(svn_membuffer_cache_t *cache
* collisions. So, we limit ourselves to xor and permutations. */
data[1] = (data[1] << 27) | (data[1] >> 37);
data[1] ^= data[0] & 0xffff;
- data[0] ^= data[1] & 0xffffffffffff0000ull;
+ data[0] ^= data[1] & APR_UINT64_C(0xffffffffffff0000);
/* combine with this cache's namespace */
cache->combined_key[0] = data[0] ^ cache->prefix[0];