/* If a multicast group has zero members left for a particular join state, but the group is still a member with the SA, we need to leave that join state. Determine which join states we still belong to, but that do not have any active members.  */
static u8 get_leave_state(struct mcast_group *group)
/* If a multicast group has zero members left for a particular join state, but the group is still a member with the SA, we need to leave that join state. Determine which join states we still belong to, but that do not have any active members.  */
static u8 get_leave_state(struct mcast_group *group)
{
	u8 leave_state = 0;
	int i;
	for (i = 0; i < 3; i++)
		if (!group->members[i])
			leave_state |= (0x1 << i);
	return leave_state & group->rec.join_state;
}