/* Returns zero if event is invalid, one otherwise.  */
static int valid_event_struct(struct event_pool *pool, struct srp_event_struct *evt)
/* Returns zero if event is invalid, one otherwise.  */
static int valid_event_struct(struct event_pool *pool, struct srp_event_struct *evt)
{
	int index = evt - pool->events;
	if (index < 0 || index >= pool->size)
		return 0;
	if (evt != pool->events + index)
		return 0;
	return 1;
}