FreeBSD/contrib/subversion/subversion/libsvn_fs_x/verify.c
/* Verify that the FNV checksum over the next ENTRY->SIZE bytes read
 * from FILE will match ENTRY's expected checksum.  SIZE must not
 * exceed STREAM_THRESHOLD.  Use SCRATCH_POOL for temporary allocations.
 */
Verify that the FNV checksum over the next ENTRY->SIZE bytes read
from FILE will match ENTRY's expected checksum.  SIZE must not
exceed STREAM_THRESHOLD.  Use SCRATCH_POOL for temporary allocations.
Verify that the FNV checksum over the next ENTRY - > SIZE bytes read from FILE will match ENTRY ' s expected checksum . SIZE must not exceed STREAM_THRESHOLD . Use SCRATCH_POOL for temporary allocations .
static svn_error_t *
expected_buffered_checksum(apr_file_t *file,
                           svn_fs_x__p2l_entry_t *entry,
                           apr_pool_t *scratch_pool)
{
  unsigned char buffer[STREAM_THRESHOLD];
  SVN_ERR_ASSERT(entry->size <= STREAM_THRESHOLD);
  SVN_ERR(svn_io_file_read_full2(file, buffer, (apr_size_t)entry->size,
                                 NULL, NULL, scratch_pool));
  SVN_ERR(expected_checksum(file, entry,
                            svn__fnv1a_32x4(buffer, (apr_size_t)entry->size),
                            scratch_pool));
  return SVN_NO_ERROR;
}
static svn_error_t * expected_buffered_checksum ( apr_file_t * file , svn_fs_x__p2l_entry_t * entry , apr_pool_t * scratch_pool ) { unsigned char buffer [ STREAM_THRESHOLD ] ; SVN_ERR_ASSERT ( entry -> size <= STREAM_THRESHOLD ) ; SVN_ERR ( svn_io_file_read_full2 ( file , buffer , ( apr_size_t ) entry -> size , NULL , NULL , scratch_pool ) ) ; SVN_ERR ( expected_checksum ( file , entry , svn__fnv1a_32x4 ( buffer , ( apr_size_t ) entry -> size ) , scratch_pool ) ) ; return SVN_NO_ERROR ; }
Verify that the FNV checksum over the next ENTRY->SIZE bytes read
 from FILE will match ENTRY's expected checksum.
Verify that the FNV checksum over the next ENTRY - > SIZE bytes read from FILE will match ENTRY ' s expected checksum .