bridge_get_pfval: use nitems instead of spelling it out longhand

MFC after:	3 days
This commit is contained in:
Enji Cooper 2017-01-04 17:38:18 +00:00
parent a0cc1855e3
commit 758268dcae
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=311291

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);