FreeBSD/sys/kern/kern_loginclass.c
/*
 * Look up a loginclass struct for the parameter name.
 * loginclasses_lock must be locked.
 * Increase refcount on loginclass struct returned.
 */
Look up a loginclass struct for the parameter name.
loginclasses_lock must be locked.
Increase refcount on loginclass struct returned.
Look up a loginclass struct for the parameter name . loginclasses_lock must be locked . Increase refcount on loginclass struct returned .
static struct loginclass *
loginclass_lookup(const char *name)
{
	struct loginclass *lc;
	rw_assert(&loginclasses_lock, RA_LOCKED);
	LIST_FOREACH(lc, &loginclasses, lc_next)
		if (strcmp(name, lc->lc_name) == 0) {
			loginclass_hold(lc);
			break;
		}
	return (lc);
}
static struct loginclass * loginclass_lookup ( const char * name ) { struct loginclass * lc ; rw_assert ( & loginclasses_lock , RA_LOCKED ) ; LIST_FOREACH ( lc , & loginclasses , lc_next ) if ( strcmp ( name , lc -> lc_name ) == 0 ) { loginclass_hold ( lc ) ; break ; } return ( lc ) ; }
Look up a loginclass struct for the parameter name.
Look up a loginclass struct for the parameter name .