bridge_get_pfval: use nitems instead of spelling it out longhand

MFC after:	3 days
This commit is contained in:
ngie 2017-01-04 17:38:18 +00:00
parent f7de6cb6bd
commit c87b1ab720

View File

@ -1449,8 +1449,8 @@ static struct {
int32_t
bridge_get_pfval(uint8_t which)
{
if (which > sizeof(bridge_pf_sysctl) / sizeof(bridge_pf_sysctl[0])
|| which < 1)
if (which > nitems(bridge_pf_sysctl) || which < 1)
return (-1);
return (bridge_pf_sysctl[which - 1].val);