FreeBSD/contrib/ntp/ntpd/ntp_peer.c
/*
 * findpeerbyassoc - find and return a peer using his association ID
 */
find and return a peer using his association ID
find and return a peer using his association ID
struct peer *
findpeerbyassoc(
	associd_t assoc
	)
{
	struct peer *p;
	u_int hash;
	assocpeer_calls++;
	hash = assoc & NTP_HASH_MASK;
	for (p = assoc_hash[hash]; p != NULL; p = p->aid_link)
		if (assoc == p->associd)
			break;
	return p;
}
struct peer * findpeerbyassoc ( associd_t assoc ) { struct peer * p ; u_int hash ; assocpeer_calls ++ ; hash = assoc & NTP_HASH_MASK ; for ( p = assoc_hash [ hash ] ; p != NULL ; p = p -> aid_link ) if ( assoc == p -> associd ) break ; return p ; }
findpeerbyassoc - find and return a peer using his association ID
findpeerbyassoc - find and return a peer using his association ID