FreeBSD/sys/net/altq/altq_fairq.c
/* convert a class handle to the corresponding class pointer */
convert a class handle to the corresponding class pointer
convert a class handle to the corresponding class pointer
static struct fairq_class *
clh_to_clp(struct fairq_if *pif, uint32_t chandle)
{
	struct fairq_class *cl;
	int idx;
	if (chandle == 0)
		return (NULL);
	for (idx = pif->pif_maxpri; idx >= 0; idx--)
		if ((cl = pif->pif_classes[idx]) != NULL &&
		    cl->cl_handle == chandle)
			return (cl);
	return (NULL);
}
static struct fairq_class * clh_to_clp ( struct fairq_if * pif , uint32_t chandle ) { struct fairq_class * cl ; int idx ; if ( chandle == 0 ) return ( NULL ) ; for ( idx = pif -> pif_maxpri ; idx >= 0 ; idx -- ) if ( ( cl = pif -> pif_classes [ idx ] ) != NULL && cl -> cl_handle == chandle ) return ( cl ) ; return ( NULL ) ; }
convert a class handle to the corresponding class pointer
convert a class handle to the corresponding class pointer