FreeBSD/contrib/subversion/subversion/libsvn_fs_x/verify.c
/* Compare the ACTUAL checksum with the one expected by ENTRY.
 * Return an error in case of mismatch.  Use the name of FILE
 * in error message.  Allocate temporary data in SCRATCH_POOL.
 */
Compare the ACTUAL checksum with the one expected by ENTRY.
Return an error in case of mismatch.  Use the name of FILE
in error message.  Allocate temporary data in SCRATCH_POOL.
Compare the ACTUAL checksum with the one expected by ENTRY . Return an error in case of mismatch . Use the name of FILE in error message . Allocate temporary data in SCRATCH_POOL .
static svn_error_t *
expected_checksum(apr_file_t *file,
                  svn_fs_x__p2l_entry_t *entry,
                  apr_uint32_t actual,
                  apr_pool_t *scratch_pool)
{
  if (actual != entry->fnv1_checksum)
    {
      const char *file_name;
      SVN_ERR(svn_io_file_name_get(&file_name, file, scratch_pool));
      SVN_ERR(svn_io_file_name_get(&file_name, file, scratch_pool));
      return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
                               _("Checksum mismatch in item at offset %s of "
                                 "length %s bytes in file %s"),
                               apr_off_t_toa(scratch_pool, entry->offset),
                               apr_off_t_toa(scratch_pool, entry->size),
                               file_name);
    }
  return SVN_NO_ERROR;
}
static svn_error_t * expected_checksum ( apr_file_t * file , svn_fs_x__p2l_entry_t * entry , apr_uint32_t actual , apr_pool_t * scratch_pool ) { if ( actual != entry -> fnv1_checksum ) { const char * file_name ; SVN_ERR ( svn_io_file_name_get ( & file_name , file , scratch_pool ) ) ; SVN_ERR ( svn_io_file_name_get ( & file_name , file , scratch_pool ) ) ; return svn_error_createf ( SVN_ERR_FS_CORRUPT , NULL , _ ( " " " " ) , apr_off_t_toa ( scratch_pool , entry -> offset ) , apr_off_t_toa ( scratch_pool , entry -> size ) , file_name ) ; } return SVN_NO_ERROR ; }
Compare the ACTUAL checksum with the one expected by ENTRY.
Compare the ACTUAL checksum with the one expected by ENTRY .