/*  by Richard Frowijn : first release.  by Frank Denis : basic optimisations.  by Frank Denis : qnx4_is_free, qnx4_set_bitmap, qnx4_bmap .  by Frank Denis : qnx4_free_inode (to be fixed) .  */
static void count_bits(register const char *bmPart, register int size, int *const tf)
/*  by Richard Frowijn : first release.  by Frank Denis : basic optimisations.  by Frank Denis : qnx4_is_free, qnx4_set_bitmap, qnx4_bmap .  by Frank Denis : qnx4_free_inode (to be fixed) .  */
static void count_bits(register const char *bmPart, register int size, int *const tf)
{
	char b;
	int tot = *tf;
	if (size > QNX4_BLOCK_SIZE) {
		size = QNX4_BLOCK_SIZE;
	}
	do {
		b = *bmPart++;
		tot += 8 - hweight8(b);
		size--;
	} while (size != 0);
	*tf = tot;
}