bridge_get_pfval: use nitems instead of spelling it out longhand
MFC after: 3 days
This commit is contained in:
parent
f7de6cb6bd
commit
c87b1ab720
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user