rem: rv = mp->ptr;
add: rv = (struct free_blk *)mp->ptr;
context: void *pool_get(struct pool_ctl *p){	/* ok, so now we look for a suitable block... */	struct pool_mem *mp = p->list;	struct free_blk *rv = NULL;	#if POOL_USES_BENAPHORES		ACQUIRE_BENAPHORE(p->lock);	#else		ACQUIRE_WRITE_LOCK(p->lock);	#endif	if (p->freelist) {		/* woohoo, just grab a block! */		rv = p->freelist;		ASSERT(rv->magic == FREE_MAGIC);		ASSERT(FREE_MAGIC + (uint32)rv->next == rv->magic_check);		if (p->debug)			dprintf("%s: allocating %p, setting freelist to %p\n",				p->name, p->freelist, rv->next);		p->freelist = rv->next;		#if POOL_USES_BENAPHORES			RELEASE_BENAPHORE(p->lock);		#else			RELEASE_WRITE_LOCK(p->lock);		#endif				memset(rv, 0, p->alloc_size);		return rv;	}			#if !POOL_USES_BENAPHORES		RELEASE_WRITE_LOCK(p->lock);		ACQUIRE_READ_LOCK(p->lock);	#endif	/* no free blocks, try to allocate of the top of the memory blocks	** we must hold the global pool lock while iterating through the list!	*/	do {		ACQUIRE_BENAPHORE(mp->lock);		if (mp->avail >= p->alloc_size) {			rv = mp->ptr;			mp->ptr += p->alloc_size;			mp->avail -= p->alloc_size;			RELEASE_BENAPHORE(mp->lock);			break;		}		RELEASE_BENAPHORE(mp->lock);	} while ((mp = mp->next) != NULL);	#if POOL_USES_BENAPHORES		RELEASE_BENAPHORE(p->lock);	#else		RELEASE_READ_LOCK(p->lock);	#endif	if (rv) {		memset(rv, 0, p->alloc_size);		return rv;	}	mp = get_mem_block(p);	if (mp == NULL)		return NULL;	ACQUIRE_BENAPHORE(mp->lock);	if (mp->avail >= p->alloc_size) {		rv = mp->ptr;		mp->ptr += p->alloc_size;		mp->avail -= p->alloc_size;	}	RELEASE_BENAPHORE(mp->lock);	memset(rv, 0, p->alloc_size);	return rv;}