FreeBSD/contrib/bsnmp/snmpd/main.c
/*
 * Iterate through all ports until a function returns a 0.
 */
Iterate through all ports until a function returns a 0.
Iterate through all ports until a function returns a 0 .
struct tport *
trans_iter_port(struct transport *t, int (*func)(struct tport *, intptr_t),
    intptr_t arg)
{
	struct tport *p;
	TAILQ_FOREACH(p, &t->table, link)
		if (func(p, arg) == 0)
			return (p);
	return (NULL);
}
struct tport * trans_iter_port ( struct transport * t , int ( * func ) ( struct tport * , intptr_t ) , intptr_t arg ) { struct tport * p ; TAILQ_FOREACH ( p , & t -> table , link ) if ( func ( p , arg ) == 0 ) return ( p ) ; return ( NULL ) ; }
Iterate through all ports until a function returns a 0.
Iterate through all ports until a function returns a 0 .