filehash/ffdb_page.c
static unsigned int
_ffdb_page_checksum (ffdb_htab_t* hashp, void* pagep)
{
  unsigned int chksum = 0;
  
  /* check sum everything before checksum entry */
  chksum = __ffdb_crc32_checksum (chksum, pagep, CHKSUM_POS);
  /* check sum everything after the checksum entry */
  chksum = __ffdb_crc32_checksum (chksum, 
				  (unsigned char *)pagep + CHKSUM_OFFSET,
				  hashp->hdr.bsize - CHKSUM_OFFSET);

  return chksum;
}
/**
 * Calculate check sum for a page
 */
Calculate check sum for a page
Calculate check sum for a page
static unsigned int
_ffdb_page_checksum (ffdb_htab_t* hashp, void* pagep)
{
  unsigned int chksum = 0;
  chksum = __ffdb_crc32_checksum (chksum, pagep, CHKSUM_POS);
  chksum = __ffdb_crc32_checksum (chksum, 
				  (unsigned char *)pagep + CHKSUM_OFFSET,
				  hashp->hdr.bsize - CHKSUM_OFFSET);
  return chksum;
}
static unsigned int _ffdb_page_checksum ( ffdb_htab_t * hashp , void * pagep ) { unsigned int chksum = 0 ; chksum = __ffdb_crc32_checksum ( chksum , pagep , CHKSUM_POS ) ; chksum = __ffdb_crc32_checksum ( chksum , ( unsigned char * ) pagep + CHKSUM_OFFSET , hashp -> hdr . bsize - CHKSUM_OFFSET ) ; return chksum ; }
Calculate check sum for a page
Calculate check sum for a page
/* check sum everything before checksum entry */ /* check sum everything after the checksum entry */