FreeBSD/contrib/ntp/libntp/authkeys.c
/* ----------------------------------------------------------------- */
/* scan a list to see if it contains a given address. Return the
 * default result value in case of an empty list.
 */
scan a list to see if it contains a given address. Return the
default result value in case of an empty list.
scan a list to see if it contains a given address . Return the default result value in case of an empty list .
int 
keyacc_contains(
	const KeyAccT    *head,
	const sockaddr_u *addr,
	int               defv)
{
	if (head) {
		do {
			if (SOCK_EQ(&head->addr, addr))
				return TRUE;
		} while (NULL != (head = head->next));
		return FALSE;
	} else {
		return !!defv;
	}
}
int keyacc_contains ( const KeyAccT * head , const sockaddr_u * addr , int defv ) { if ( head ) { do { if ( SOCK_EQ ( & head -> addr , addr ) ) return TRUE ; } while ( NULL != ( head = head -> next ) ) ; return FALSE ; } else { return ! ! defv ; } }
scan a list to see if it contains a given address.
scan a list to see if it contains a given address .
/*BOOL*/