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

scan-log-moves hash structure

From: Philip Martin <philip_at_codematters.co.uk>
Date: Fri, 25 Nov 2011 13:18:14 +0000

scan_moves_log_receiver does:

          moves = apr_hash_get(b->moves, &new_move->revision,
                               sizeof(svn_revnum_t));
          if (moves == NULL)
            {
              moves = apr_array_make(result_pool, 1,
                                     sizeof(svn_wc_repos_move_info_t *));
              APR_ARRAY_PUSH(moves, svn_wc_repos_move_info_t *) = new_move;
              apr_hash_set(b->moves, &new_move->revision, sizeof(svn_revnum_t),
                           moves);
            }
          else
            APR_ARRAY_PUSH(moves, svn_wc_repos_move_info_t *) = new_move;

The hash get and set are using the *address* of the revnum, not the
revnum itself. That doesn't look right to me, I think it should be
using the revnum. If it is right then the sizeofs are wrong.

-- 
Philip
Received on 2011-11-25 14:18:56 CET

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.