[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1396826 - /subversion/trunk/subversion/libsvn_fs_fs/tree.c

From: Greg Stein <gstein_at_gmail.com>
Date: Wed, 10 Oct 2012 18:31:54 -0400

Eh? I thought revnums were longs. Not 64-bit (except by happenstance)
On Oct 10, 2012 3:06 PM, <hwright_at_apache.org> wrote:

> Author: hwright
> Date: Wed Oct 10 22:05:34 2012
> New Revision: 1396826
>
> URL: http://svn.apache.org/viewvc?rev=1396826&view=rev
> Log:
> Avoid integer size mismatch warning.
>
> * subversion/libsvn_fs_fs/tree.c
> (cache_entry_t, cache_lookup): Adjust hash_value to match the size of the
> revision number, which is an input to the hash value.
>
> Modified:
> subversion/trunk/subversion/libsvn_fs_fs/tree.c
>
> Modified: subversion/trunk/subversion/libsvn_fs_fs/tree.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/tree.c?rev=1396826&r1=1396825&r2=1396826&view=diff
>
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_fs_fs/tree.c (original)
> +++ subversion/trunk/subversion/libsvn_fs_fs/tree.c Wed Oct 10 22:05:34
> 2012
> @@ -148,7 +148,7 @@ typedef struct cache_entry_t
> {
> /* hash value derived from PATH, REVISION.
> Used to short-circuit failed lookups. */
> - apr_uint32_t hash_value;
> + apr_uint64_t hash_value;
>
> /* revision to which the NODE belongs */
> svn_revnum_t revision;
> @@ -337,7 +337,7 @@ cache_lookup( fs_fs_dag_cache_t *cache
> {
> apr_size_t i, bucket_index;
> apr_size_t path_len = strlen(path);
> - apr_uint32_t hash_value = revision;
> + apr_uint64_t hash_value = revision;
>
> /* optimistic lookup: hit the same bucket again? */
> cache_entry_t *result = &cache->buckets[cache->last_hit];
>
>
>
Received on 2012-10-11 00:32:27 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.