bin/varnishd/hash/hash_critbit.c
static unsigned
hcb_crit_bit(const uint8_t *digest, const struct objhead *oh2, struct hcb_y *y)
{
	unsigned char u, r;

	CHECK_OBJ_NOTNULL(y, HCB_Y_MAGIC);
	for (u = 0; u < DIGEST_LEN && digest[u] == oh2->digest[u]; u++)
		;
	assert(u < DIGEST_LEN);
	r = hcb_bits(digest[u], oh2->digest[u]);
	y->ptr = u;
	y->bitmask = 0x80 >> r;
	y->critbit = u * 8 + r;
	return (y->critbit);
}
/*---------------------------------------------------------------------
 * Find the "critical" bit that separates these two digests
 */
Find the "critical" bit that separates these two digests
Find the " critical " bit that separates these two digests
static unsigned
hcb_crit_bit(const uint8_t *digest, const struct objhead *oh2, struct hcb_y *y)
{
	unsigned char u, r;
	CHECK_OBJ_NOTNULL(y, HCB_Y_MAGIC);
	for (u = 0; u < DIGEST_LEN && digest[u] == oh2->digest[u]; u++)
		;
	assert(u < DIGEST_LEN);
	r = hcb_bits(digest[u], oh2->digest[u]);
	y->ptr = u;
	y->bitmask = 0x80 >> r;
	y->critbit = u * 8 + r;
	return (y->critbit);
}
static unsigned hcb_crit_bit ( const uint8_t * digest , const struct objhead * oh2 , struct hcb_y * y ) { unsigned char u , r ; CHECK_OBJ_NOTNULL ( y , HCB_Y_MAGIC ) ; for ( u = 0 ; u < DIGEST_LEN && digest [ u ] == oh2 -> digest [ u ] ; u ++ ) ; assert ( u < DIGEST_LEN ) ; r = hcb_bits ( digest [ u ] , oh2 -> digest [ u ] ) ; y -> ptr = u ; y -> bitmask = 0x80 >> r ; y -> critbit = u * 8 + r ; return ( y -> critbit ) ; }
Find the "critical" bit that separates these two digests
Find the " critical " bit that separates these two digests